This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Text Analytics - PDF - Regex Issue

Hey

I'm new to Regex but working my way through,
I have the correct syntax i need to find certain words when testing with a text file, but when i use it on the PDF it will not work,
Must be an issue with Columns or spacing etc.

i was wondering if someone could point me in the right direction of how i could get it to find the Value.
In the attachment bellow, it would be '0.27'

{
    "targetName": " Total Ex GST",
    "documentContentPattern": "(Total Charges Excluding GST:\s*\$(?<value>(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$))",
    "Comment": "",
    "enabled": true
}


Also, could i get this to map to a Property Field that was set to Number (real)

Parents
  • Hi Pete
    Your PDF is probably designed using some sort of forms. To ours eyes the line your are attempting to analyze looks like one continuous line but actually it is two contiguous fields. Therefor the computer might read it differently. Try to mark the text in the PDF and copy it to e.g. Notepad. You will probably get the text part in one line and the amount in the next line. If so you will have to adjust your reqex accordingly.
    Last I checked it was not possible to map results to number fields (don't know why). You can map it to a text field.
Reply
  • Hi Pete
    Your PDF is probably designed using some sort of forms. To ours eyes the line your are attempting to analyze looks like one continuous line but actually it is two contiguous fields. Therefor the computer might read it differently. Try to mark the text in the PDF and copy it to e.g. Notepad. You will probably get the text part in one line and the amount in the next line. If so you will have to adjust your reqex accordingly.
    Last I checked it was not possible to map results to number fields (don't know why). You can map it to a text field.
Children
No Data