Regex Help...anyone?

I originally wrote a pdf to txt, replaced foreign characters, split the remaining string for the date (first two groups of numbers) and then split the end at " ").Last.

But in some cases I am missing numbers
01/11 Orig CO Name:Test Company Orig ID:9169130001 Desc Date:Offset CO 30,020.00
01/11 Orig CO Name:Test Dept of Revenue Orig ID:9044030460 Desc 1,143.00

There seem to be two different scenarios. In my original code instead of 30,020.00 my code provided 3020. Any thoughts on an alternative Regex? All lines needed begin with a date as shown and end with the value needed for the analysis

Can you please simplify the request by providing if we dont have understood on the first round

  • sample input
  • expected output for each input sample

currently it sounds that you are interested on the last value.

Last value is fine - I can get date by split…goal is the 01/11 as well…just need a different regex to try because having some slight variations in the file…trying to measure consistency…will try your idea…thanks!!!

Thanks my friend but it does not work consistently on each row. I did come up with an alternative solution which, although has some more iterations, is able to pull the data. Have a great day!!

Chris

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