Extract from string

Hi friends,
Here is my input string:
“Beverages and Catering . CAD . CAD” and “IT Support RON RON” and i want result from first string like “Beverages and Catering” and from second string i want result like “IT Support”.

  • Here if i split by space then didnt get expected result.
  • can we remove last two words from above string.
  • kindly suggest the other way to achive this.

Regards,

Just to know better, those words that have to be kept are randomic and can be any word? Or do you have some kind of “list of specific words” that wanna be identified and treated inside of these strings? (such as: MyList{Beverages and Catering, IT Support, …}

could you please guide me to remove last two words from string.i will achive the expected result.

Hi @Rup_1

Is that a static value of string or dynamically change ?

cheers :smiley:

Happy learning :smiley:

2 Likes

its value change dynamically.

1 Like

Hi @Rup_1

Try string array instead of list
Based on that you can split

Item.ToString.split({""},Stringsplitoptions.none)

Thanks
Ashwin.S

@Rup_1 Hi, check below workflow once

Test.xaml (8.9 KB)

@Rup_1 so to get first one
Say your input is stored in a variable say outtext
-for first one **outtext.substring(0,22)**this will give you the first one.
-for the second one **outtext.substring(40,9)**this will give you second one.

Hi Manjuts90
It works for me.
Thank you.

1 Like

Hello Rup1
if it worked you have to mark the comment as the solution
Thanks

You can also use regex like:

.+?(?=CAD)

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