String manipulation, a whole word from a part of it

Hi there, any smart one could help me out with this one? haha

I have a text in a variable. Once i verify a part of a word is in it (i use contains), i want to copy the whole world. It would be something like this:

As it is a location, im sure that what im looking for starts with /PLACE1/ but then it continues and may vary… for example /PLACE1/lkdflajhdjhakj/jkhljsahdjsa so i want to have in a new variable the hole “word” as it will end when a space character appears…

Any idea?? Thanks

Hi, welcome

We can use functions String.Split which divides a string into an array of shorter strings, with a seperator we specify, and substring, which gives us a shorter section of a string, seperated at position we specify.

Have a look at the attached

Main.xaml (7.2 KB)

Hi,.

I suppose you can get it using Matches Activity.
The pattern property will be "/PLACE1/\S*?(\s|$)"
You need to use Trim method because result because the result might end with white space.

Regards,

Yoichi

Great! It works fine like that… thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.