I am unable to get a result from the following regex (System.Text.RegularExpressions.Regex.Match(PdfText, “Ans1\s:([^?.])Q2”).Groups(1).Value.Trim).
The value I am after is the phone number from the string below:
Q1 :- Phone number? Ans1
Any ideas what is going wrong please? The regex displays correctly when typed into regex101.com but once it is in UiPath it doesn’t. Is this something to do with multiple lines? The problem is that I can’t use \n as the value may appear on the same line as Ans1 in some instances.
Any help would be much appreciated.