@AhmedKutraphali - that was provided in the assumption that the first value does not have any spaces…since the Handling Fee is having spaces in between…that regex pattern wont work…
Ahh I see , by the way @prasath17 …how do we modify your regex that it will only extract Total for GL Code : 516-000-3115-000-00 with this sample number pattern ?
Total Code : 421-000-3110-000-00 901,358.63 1,264,111.83 -362,753.20
21983 Purchase Order 1.00 840.96 -840.96
Total for Supplier : 78225020 - South-East Lumber Co 0.020 8340.96 -8340.96
20978 Purchase Order 0.00 1,2633.60 -1,263.60
Total for Supplier : 790230T10 - Flooring 0.00 1,263.60 -1,263.60
Total Code : 421-000-3110-000-00 901,358.63 1,264,111.83 111,743.20
Total Code : Handling Fee 435.00 0.00 435.00
we should not include Total Code : Handling Fee since the next string is Handling Fee and not something like 15 digits numbers like 421-000-3110-000-00 . Thanks
Thank you for this @prasath17 . By the way would this works on the new regex ? YourRegexVariable(0).groups(“ThirdAmt”).tostring ? for example on getting this value
I tried this YourRegexVariable(0).groups(“ThirdAmt”).tostring to 432-000-3117-000-00 12804.00 9723.00 3081.00 it did not get the correct value which ois 3081.00
Ive replace {2} with {3} (?<=Total for GL Code :\s?)[\d-]{19}(\s+\S+){3}\s?(?[\d.,-]+) now it gets the set of numbers
sample output : 432-000-3117-000-00 12804.00 9723.00 3081.00
but how do we get the last set of number ? like for example above output should be 3081.00
I tried your Item.Groups(2).ToString but it did not work. Thanks
@AhmedKutraphali - Did you refer my screenshot above? where it captured the 3081 clearly…I am not sure what you are trying. I have already provided the code sample too…