I am trying to write a regex that will work for for both these cases: The table I am working with is actually on a pdf file but I had the data in excel also.
This is what I have so far, but it only works when all the columns are populated
([\d+,]+\.\d+ \w+) ([\d+,]+\.\d+) ([\d,]+\.\d+) ([\d,]+\.\d+)? ([\d,]+\.\d+)? (\d+\/\d+ yrs)? (\([\d,]+\.\d+\))? ([\d,]+\.\d+)
I would like my search to return "None" when the columns are not populated. For example, first line in searching would be:
40.01 SQ 90 20.01 650.01 4,750.00 4,750.00
How can I get group(6) and group(7) to be "None"?
Second line would be: 40.01 SQ 76.9 1,200.20 659.22 47,233.12 10/75 yrs (2,444.23) 37,254.22
I've been playing around with optional quantifiers but not having much luck. Any help is greatly appreciated.
