I have the following sample text, I am trying to pull the Vendor [name on line after INVOICE], the NC#, the NCDA date, Number after Customer ID line, the text after that and the second dollar amount.
I started with INVOICE\s+(?.*\S) but it does not grab the full vendor name
INVOICE
Intuit [Quickbooks]
N C # 1000146489469
N C DA : 05/13/2020
2800 E. Commerce Center Place,
Tucson, Arizona 85706
Phone:
B
Elroy Taulton
QuickBooks Online
Essentials
$40.00 $40.00
SUBTOTAL
DISCOUNT
$40.00
($28.00)
NET 30
TAX $0.79
6/15/2020
$12.79
Make All Checks Payable To: Intuit [Quickbooks]
THANK YOU FOR YOUR BUSINESS!
INVOICE
CAMERA READY Studios
N C # 12001
N C DA : 05/01/2020
North Dallas Rental
Dallas, Texas 75206
Phone: 214-390-7690
B
Elroy Taulton
The number on the new line after the customer ID:
(?<=Customer ID: )(\d+\n)(\d+) Regex101 Link
Note: To get the variable you will need to use âMatch 2â.
In an assign activity: use this, INSERTVARIABLE(0).Groups(2).ToString
Replace the characters with your output variable.
Not 100% sure what you mean by âthe text after thatâ.
The expected output/s would be helpful.
The second dollar amountâŚnot 100% sure but this might be it:
$\d+.\d+\n(?=SUBTOTAL) Regex101 Link
Yes, but I am pretty sure UiPath doesnât interpret PHP regex the same. I think it uses a flavor of .NET which have some differences. I could be wrong, but I believe this is correct.
I believe UiPath is built on .Net framework yes. The regex101 patterns reference the flavor as PHP which always work for me in the UiPath environment, maybe its something else?
I donât know enough sorry to respond fully. But it would explain differences.
Iâm sure someone else who knows more can answer this questionâŚ
Did find one issue that was causing some problems. Have been able to grab to first two pieces of information with
INVOICE\s+(?<vendor>.\s\S[^\n]).(?<=N C # )(?<invoice>\d+)