i need to get 10 digit number after the Net AMount] using regesx
I THIS IS A CONFIRMATION OF OUR CARD PAYMENT I
[Invoice Number Customer Account/ Comment PO Number Date Due Date Amount Discount Net Amount]
1716510480 Comment: 9497 6/1/2019 7/10/2019 $20.77 $0.00 $20.77
Total: $20.77
Please charge a total of $20.77 to MasterCard
Card Number: 5567660649214363 Expires: 08/2019
CCV: 345
Cardholder Name: NVoicePay, Card Holder Company
Name: NVoicePay
Billing Address: 8905 SW Nimbus Avenue Suite 240,
Beaverton, OR 97008
IMPORTANT:
C) nvomepay , , ,
If you require the security code, please contact the customer directly.
If you have other questions please call Vendor Services at 877.626.6332.
If you are changing your payment email address or bank account, please email
If this is always the first 10 digit number in your string (it looks like) you can simply use Matches activity. As a pattern specify “\d{10}”. As a result you will get a collection of all 10 digits numbers from your string. The match with index 0 will be the first one.
The other approach is to get all ten digits between net amount and comment anchors with pattern
(?<=Net Amount]\n)(\d{10})(?=\sComment)
yep am getting answer 1716469307 this is am expected and i need one small thing
in the below more than one 10 digit numbers i want to reject is there any idea
PHILADELPHIA, PA 19178-3531
Accounts Receivable Department:
THIS IS A CONFIRMATION OF OUR CARD PAYMENT
Invoice Number Customer Account / Comment PO Number Date Due Date Amount Discount Net Amount
1716469307 Comment: SUBARU 6/5/2019 7/5/2019 $1,598.00 $0.00 $1,598.00
1716482490 Comment: MAZDA 6/5/2019 7/5/2019 $2,000.00 $0.00 $2,000.00
1716492267 Comment: VW 6/5/2019 7/5/2019 $799.47 $0.00 $799.47
1716574858 Comment: ACURA 6/5/2019 7/5/2019 $999.00 $0.00 $999.00
77029678-1 Comment: VW 3/31/2019 4/30/2019 $355.91 $0.00 $355.91
Total:
$5,752.38
Please charge a total of $5,752.38 to MasterCard
above is my input if am using regex i got 10 number 1716469307 its ok for me but in next line its also contains another 10 digit number if the suitation i want to reject this invoice