Jump to content
Server Maintenance This Week. ×

Extract text Between Two text Strings of varying length


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

Recommended Posts

Hi

I am constantly coming across situations where I would like to extract the text of varying length between two text strings. I would like to use a insert calculation to get this information to a new field called. " MyINFO"

 

EX

 

Record contains text

 

I used to go to the country to see all the farm animals. Now I stay home.

I used to go to the city to view all the tourist sites. Now I stay home.

I used to go to the beach to swim in the ocean. Now I stay home.

I used to go to the bars to see people. Now I stay home. 

 

So in the above cases I am needing to extract the text between  "I used to go"   and " Now I stay Home."

 

Is there a simple way to do this in an Insert calculation script step?

thank you

 

Link to comment
Share on other sites

I  don't know how to do that. I went to my custom functions window and pasted in the function but it has errors.etc. I just want to learn how to do this somehow.  I don't understand what to do with custom functions but my bigger concern is learning how to do this for my understanding.

Link to comment
Share on other sites

If you want to learn the basic of how to do something like this I would start playing around with the Position (), Left (), Right (), Middle (), length (), and perhaps even Trim () functions.

 

You can use combinations of them to parse characters out of strings. 

  • Like 1
Link to comment
Share on other sites

I see but the example I am using is not extracting characters from the strings it is to get the text between two strings

I f I could see how it is done with my example I could understand it I think.

 

 

 

I used to go to the country to see all the farm animals. Now I stay home.

I used to go to the city to view all the tourist sites. Now I stay home.

I used to go to the beach to swim in the ocean. Now I stay home.

I used to go to the bars to see people. Now I stay home. 

 

I want to get the text between "I used to go" and  "Now I stay home."

So it seems to become some kind of middle function

Link to comment
Share on other sites

If you want to learn the basic of how to do something like this I would start playing around with the Position (), Left (), Right (), Middle (), length (), and perhaps even Trim () functions.

 

You can use combinations of them to parse characters out of strings.

There some videos that Skeleton Key has posted to YouTube that are pretty good in explaining how to uses these functions individually and in combinations. START HERE

Link to comment
Share on other sites

This topic is 4011 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
×
×
  • Create New...

Important Information

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