Jump to content

Modifying middlewords


This topic is 5612 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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";"/"])

Link to comment
Share on other sites

This topic is 5612 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.