I'm having an issue and I'm hoping there is someone who is more knowledgeable with Regex that can help me out.
I'm trying to extract data from a PDF file which contains a budget line items. I'm using this regex pattern to get the index of the first number so I can then extract the numbers to the right.
Regex pattern:
(([(]?[0-9]+[)]? )|([(]?[0-9]+[)]?)|(- )|(-))+$
Line item: 'Modernization and improvement (note 9) 260 (180) 640 - 155'
This works well for 99% of the line items except this one I came across. The problem is the pattern matches the '9)' in what is the text portion.
Is there any way with this Regex pattern to say if there are brackets, the inside must contain numbers only?
Thanks!