Build, test, and debug regular expressions
This PCRE regex parses Polish invoice tables from Mega Tools documents, capturing the complete table content between the header (Lp, Opis towaru/uslugi, Ilość, jm., Cena, Wartosc VAT) and the summary section. It extracts monetary values including net amount (WartoscNetto), VAT amount (KwotaVAT), gross amount (WartoscBrutto), and the amount due (DoZaplaty), with the latter using a backreference to ensure it matches the gross total. The pattern handles European number formatting with thousands separators and is designed for case-insensitive matching.