I have something like the following:
Word Word Word 123abc456 $1,234.56
I need to extract the 123abc456. Sometimes it will be 123456 with no letters as well.
I have something like the following:
Word Word Word 123abc456 $1,234.56
I need to extract the 123abc456. Sometimes it will be 123456 with no letters as well.
@Will_Tyler Try below regex.
String variable1 = System.Text.RegularExpressions.Regex.Match(“Word Word Word 123abc456 $1,234.56”,“(?<=Word Word Word).+(?=\$)”).ToString.Trim
If you want to use variable instead of using string directly then try below one.
String str = “Word Word Word 123abc456 $1,234.56”
String variable1 = System.Text.RegularExpressions.Regex.Match(str,“(?<=Word Word Word).+(?=\$)”).ToString.Trim
What if the “word word word” changes every time?
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.