Regex multiple lines


i have a flow where I read hundreds of PDF’s searching for the number of children with an indication. I use regex and it seems to be working for most of the PDF’s. When the info is on multiple lines it does not work. I use this regex:


The first part is because in some PDF it says one instead of 1. In the PDF’s there are multiple checks if I can find a number of children.

For this kind of PDF it does not work. Can someone please help?

Thnx in advance.

Greetings Dion

@Dion please provide Text.


How about the following pattern?



Inzet 2023
Op 1 januari van dit jaar heeft de houder de inzet van de uren van de PBM VE bepaald en beschreven. De rekennorm is 10 uur per doelgroeppeuter per jaar. Voor 2023 heeft ‘En nu jij’ 3 kinderen met een VVE indicatie. De houder heeft de inzet in het Pedagogisch beleidsplan (versie 17-03-2023) vastgelegd.

No, does not get the “3”

Try this one:


How about the following?



Hi @Dion
Try this

Hi @Dion

Use the below regex expression to extract the output from the above Paragraph Input.


Hope it helps!!

This seems to work for my first example. In this case it does not find the 6:

De houder heeft in het document ‘Verantwoording coaching 2023’ vastgelegd aan hoeveel doelgroep peuters op peildatum 01-01-2023 voorschoolse educatie wordt aangeboden. Voor KDV Gevaren gaat dit om 6 doelgroep peuters.

In other pdf’s there is no “jij” so I cannot use that word.

Try this

Hi @Dion

Try with below mentioned regex expression



Al right. Perhaps you should use [- ]? instrad of -? in your original pattern, as the following.

 \b(een|één|twee|drie|vier|vijf|zes|zeven|acht|negen|tien|\d+)\b(?=\s+(doelgroep[- ]?peuters?|doelgroep-?kind|(V|VVE)?E\s*kinderen|kinderen\s*met\s*(een\s*)?(VE|VVE)?[- ]?indicatie))


Yes, this is it!

Thnx (all)!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.