To extract the particular word forms the statement

Hi Team,
I have one statement like this TBarnes c9908957 Tabisa barnes - GTT- call cntr agent
so here, I want to extract this c9908957 using regular expression in Uipath.
Please help me to reslove the issue
Thanks,
Devil.

Hi @devill

Welcome to community!

We can sort it through split!

InputString.split(" "c)(1) will result the output

Regards

Hi @devill

Try this Regex Expression

Use Assign activity

LHS - Create an Variable
RHS - System.Text.RegularExpressions.Regex.Match(“Input String”,“[A-Za-z]\d+”).Tostring.Trim

Hope it will work

Regards
Gokul

Assign InputString=" TBarnes c9908957 Tabisa barnes - GTT- call cntr agent"

System.Text.RegularExpressions.Regex.Match(InputString,“(?<=TBarnes ).*?(?=Tabisa )”).ToString.Trim

Hi @devill

try using this expression
System.Text.RegularExpressions.Regex.Match(Str_input,“([a-z][\d]*[\d])”)

Happy Learning

Hi!

Try this:

System.Text.RegularExpressions.Regex.Match(Str_input,"(?<=TBarnes).*\s+(?=Tabisa)")

Reference

Regards,
NaNi

Hi @devill ,

Welcome to the community!!.

Give a try on this :slight_smile:
System.Text.RegularExpressions.Regex.Match(“TBarnes c9908957 Tabisa barnes - GTT- call cntr agent”,“([a-z][\d]*[\d])”).Value

Thanks

Kindly mark the appropriate post as solved, If you query is resolved @devill

So, that it will help others to

Regards
Gokul