Hi, I need to extract a part of a string.
String = Invoice Total for Provider of Service MARC A SHOLES, L.C.S.W.
ExtractedString = MARC A SHOLES, L.C.S.W.
So, basically, “Invoice Total for Provider of Service” is static, and I have to extract everything after that.
I have used the expression,
So, In UiPath, I used - System.Text.RegularExpressions.Regex.Match(strProviderString,“/^Invoice Total for Provider of Service (.+)$/gm”).Value
But I’m not getting the expected value.
Please help!
Yoichi
(Yoichi)
June 29, 2023, 9:13am
2
Hi,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Invoice Total for Provider of Service ).+").Value
Regards,
1 Like
Yoichi
(Yoichi)
June 29, 2023, 9:22am
5
FYI, it’s better to set .NET(C#) at flavor in regex101. / is delimiter of regex for perl, PHP etc, however it’s unnecessary in .net(C# or VB) and as “gm” at the end of the string is regex option, it’s unnecessary to add to pattern.
Regards,
system
(system)
Closed
July 2, 2023, 9:22am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.