How to split the String variable

how to split string variable
Eg: StringVariable=chethan001@gmail.com
I want only chethan
how to do that.
please help me, someone

Use split for given string say Split(Var,"@")(0)
and then use \w regex for capturing only words

2 Likes

how to use \w regex how to use that

1 Like

Use matches activity in that use “[a-zA-Z]” as pattern and then store result
for joining result use String.Join("",str)

1 Like

Hello

Try this workflow using Regex Matches.

Main.xaml (5.2 KB)

With Regex - its always best to provide:
Sample
Output
Pattern

If you want to learn Regex - read my REGEX MEGAPOST

Check out the Regex Pattern on Regex101.com
image

2 Likes

Thank you! very much.

it was showing some error when am implement to my project
error is bellow

sorry i get the solution its working its work when the numeric value in the string so i put that in try catch on that time its work thank you so much!

1 Like

Sometimes a string needs to be cleaned - see my MEGAPOST on how to clean.

1 Like

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