wintergreen Posted July 28, 2006 Posted July 28, 2006 I've been using the middlewords function to extract some data from a space delimited source. it worked fine, especially given that the number of spaces is completely variable, except that some of the data uses underscores, i.e. JIM_B and the middlewords function sees this as another space (the same is also true of slashes). Is there any workaround to stop it doing this?
Raybaudi Posted July 28, 2006 Posted July 28, 2006 Hi before parsing your text with the [color:blue]MiddleWords() function, try to use the [color:blue]Substitute() function, something like: 1)Substitute(yourText;["_";"XX"];["/";"YY"]) 2)your MiddleWords() parsing 3)Substitute(yourText;["XX";"_"];["YY";"/"]) So, to estract JIM_B from yourText: "My new friend JIM_B is a very good friend" Substitute(MiddleWords(Substitute(yourText;["_";"XX"];["/";"YY"]);4;1);["XX";"_"];["YY";"/"])
Recommended Posts
This topic is 6754 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now