RTTSoftware Support Forum

PDF Explorer => General => Topic started by: Frank on December 29, 2012, 07:31:29 PM

Title: Help with regular expression
Post by: Frank on December 29, 2012, 07:31:29 PM
Testing PDF Explorer.
I have several hundred invoices in PDF format. I would like to extract the invoice number to an Info Field.
In clear text the invoice number is identified like this:

Fakturanr.: XXXX

It is the 4 digit invoice number I would like to extract, and if possible validate if the invoicenumber has changed into 5 digits which it will do over time.

Can anyone help me with the proper Regular Expression string for this?

Kind regards Frank
Title: Re: Help with regular expression
Post by: RTT on December 30, 2012, 01:57:29 AM
If the invoice number is numeric only, try this one:

Fakturanr\.:[\x20]*(\d*)

The number will go into the 2nd capturing group, as exemplified in the attached screenshot where it is being extracted to a custom field named number.

Regarding the 5 digits validation. What kind of feedback you have in mind when that occurs?