Regex to extract amount after a code pattern

Regex to extract amount after this patter "Code + 3 digit number + Distribution and then get amount , sample Code: 210 -Test 1 - Distribution 2,735.84 , output is : 2,735.84.

If Code + 3 digit number + Distribution but no amount on the last part then dont extract it.

Code: 210 - Test 1 - Distribution
 999745 Check 2- Test  2/10/2021  4,000.00 
 856040 Check1- Test Deposit 2/10/2021  3,700.00 
 851075 Vis 2/10/2021   651.29
 952490 Vis 2/10/2021   651.29
 951195 Vis 2/10/2021   651.29 
 952230 Vis 2/10/2021  6521.29 

Code: 210 -Testadas 1 - Distribution  2,735.84 
Code: 230 - Testsd 2 - Distribution
 853955 Clearing 8/1/2021  47.50 

Code: 230 - Test 2 - Distribution  77.50 

output : 2,735.84
77.50

Thanks for any help.

@AhmedKutraphali - will it be always after the distribution?? Also it would be great if you show us what progress you have made so far (I am asking since you have posted similar regex questions before :wink:)

Yes it will always be after Distribution hehe

@AhmedKutraphali - Try this pattern…

Update: if this does not work, we have to update the pattern…please try and let us know…

1 Like

@AhmedKutraphali - Please wait, when i tested the above pattern, it is not giving the proper results…

Update: Please check this…

YourRegexVariaoble(0).Groups(1).tostring

2 Likes

it does not highlight the values @prasath17 , I have tested it.

@AhmedKutraphali - Here is my ouput using the same pattern…

1 Like

i have updated the data , the one Ive sent you @prasath17 . thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.