Extract text from a string based on characters around it

BBCritical

New member
I'm new here. How would I extract text from a string into a new string variable where i only know the surrounding text?

Fir example:
String1 : "This is my sample text that I'm using"
Or String1 : "this is my test text that is in use"

I want string 2 to be the words between "my" and "that"

So for the first one string2 would be "sample text" and for the second one string2 would be "test text"

An example of how to do this would be great. Thanks!
 
Last edited:
Top