Hey everyone,
I’m encountering an issue with regex in UiPath when processing text extracted from a PDF. I’m testing my regex patterns on regexstorm.net, and they work perfectly there. However, when I run the same patterns in UiPath Studio, I get no matches.
Here are the details:
Regex Patterns I’m Using:
SupplierName = "(?<=dat\s)[A-Za-zÀ-ÿ\s\.,&\-]+(?=,\s+alle)"
Date = "(?<=tot\s*\r?\n\s*)\d{1,2}\s+\w+\s+\d{4}(?=\s+heeft)"
Implementation in UiPath:
wka_Lev_Match = Regex.Match(wka_pdf_Output, "(?<=dat\s)[A-Za-zÀ-ÿ\s\.,&\-]+(?=,\s+alle)", RegexOptions.Multiline)
Sample PDF Text (as extracted in UiPath):
U hebt ons gevraagd om een actuele Verklaring betalingsgedrag
ketenaansprakelijkheid. In deze brief leest u mijn beslissing op uw aanvraag.
-Beslissing
Ik verklaar dat LOOHUIS INSTALLATIETECHNIEKEN ALMELO B.V., alle
loonheffingen over de tijdvakken tot 18 juni 2025 heeft betaald.
Over deze verklaring
Deze verklaring gaat alleen over gegevens die tot 18 juni 2025 bij de
It seems that line breaks or spacing in the extracted PDF text might be affecting the match. Has anyone faced similar issues? Is there a better way to handle this kind of sudden linebreaks and multiline content in regex within UiPath?
Greetings,
Stijn
