ValueError when using tables plugin
Hi there, I am trying to capture two or more seperate tables from my invoices. This is an example of what they look like:
CATEGORY 1
Invoice date Invoice number Amount
01.03.20 HB342344 -30 000.00
03.02.20 432432 343 043.00
CATEGORY 2
Invoice date Invoice number Amount
01.03.20 435345 27 342.00
21.03.20 455533 -3 043.00
I first used the 'lines plug-in' and it worked just fine, the only problem is that there are several seperate tables, and I need to be able to seperate them from eachother.
I tried using the 'tables plug-in' instead as it supports multiple tables per invoice.
This is my capture field for capturing only the first table(CATEGORY 1):
tables:
start: CATEGORY 1
end: CATEGORY 2
body: (?P<Invoice_Date>\d{2}\.\d{2}\.\d{2})\s+(?P<Invoice_Number>\w?\d+)\s+(?P<Invoice_Amount>-? \d{1,}\s{0,}\d{0,}\s{0,}\d{0,}\.\d{2})
when running the --debug from the console I end up getting this error:

This did not happen when I used 'lines'... What is causing this error?
I was missing the '-' symbol before start.
writing:
tables:
- start: CATEGORY 1
end: CATEGORY 2
body: (?P<Invoice_Date>\d{2}\.\d{2}\.\d{2})\s+(?P<Invoice_Number>\w?\d+)\s+(?P<Invoice_Amount>-? \d{1,}\s{0,}\d{0,}\s{0,}\d{0,}\.\d{2})
fixed the problem! My mistake, sorry.
But it only matches on the first row. Does the tables-plugin not support several rows in each table?
Your regex doesn't match the first line:
Invoice_Number:\w?allows only one (optional) character. Your example isHB342344. Make that\w*Invoice_Amount:-?requires space after-. Your example is-30 000.00. Make that-?