Hi team, I want to extract the string from given string if the particular symbol is found
E.g. I have string like : 3000432960_ART_001_GENERELL_AC_V0.1
Here I want to extract the string when first underscore is found. so the extracted string should be 3000432960.
Thanks in Advance!
Checkout this expression
System.Text.RegularExpressions.Regex.Match(YourString,"^\d+(?=\_)").Tostring.Trim
Regards
Sudharsan
Thanks @Sudharsan_Ka for the response. Let me try
Hello @Rohit_Patil1
Try This
System.Text.RegularExpressions.Regex.Match(YourString,"^[\d]+").Tostring.Trim
Hi Users,
"[1]+(?=)"
Kindly Check this
[2]+(?=)
if its correct mark as solution for other to use
thanks and regards
happy automation…
Hi,
How about the following expression?
System.Text.RegularExpressions.Regex.Match(yourString,".*?(?=_)").Value
Regards,
Another way would be to use split string…irrespective of what the string is this would extract the values
Str.Split({"_"},StringSplitOptions.None)(0)
Cheers
1 Like
This is working @Gokul_Jayakumar . Thanks
Its working @Anil_G . Thanks for the help.
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.