July 28, 200619 yr 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?
July 28, 200619 yr 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";"/"])
Create an account or sign in to comment