Hi I would like to get the Last 9 Digit # from the
Reg Exppression Extract the Last 9 Digit Number from a Line
Ex
CUST CODE: GP00300-01 INV $ : 141206175
I Need to get 141206175. Please help.
Hi I would like to get the Last 9 Digit # from the
Reg Exppression Extract the Last 9 Digit Number from a Line
Ex
CUST CODE: GP00300-01 INV $ : 141206175
I Need to get 141206175. Please help.
Hi Ganesa,
That Regex should get the last 9 digits from the line? the \d{9} will find the 9 numbers and the $ will target the end of the line.
Are you saying that the OCR will return more results along that line or overall? you could always try this one if that's the case - INV\s[#|$].*?(\d{9})
This will find your INV and any blank space between the '$' or '#' and should return the first matching 9 numbers afterwards.
Hi Ganesa,
Try either of these - (\d{9}$) OR \d{9}$
Providing you are always looking for 9 Numbers, it should work.
Regards,
Aaron
Hi Aaron,
Thanks for the reply, It will help to get the 9 Digit number, but unfortunately there are in more areas 9 Digit numbers are there... I need to extract the 9 Digit number from the particular line
CUST CODE: GP00300-01 INV $ : 141206175 some times the OCR'ed is capturing as
CUST CODE: GP00300-01 INV # : 141206175
Basically My Invoice is shows as
CUST CODE: GP00300-01 INV # : 141206175
Hi Ganesa,
That Regex should get the last 9 digits from the line? the \d{9} will find the 9 numbers and the $ will target the end of the line.
Are you saying that the OCR will return more results along that line or overall? you could always try this one if that's the case - INV\s[#|$].*?(\d{9})
This will find your INV and any blank space between the '$' or '#' and should return the first matching 9 numbers afterwards.
Thanks Aaron.... You saved my time.... Works perfect