RegexBuilder IsMatch

I need help with a regular expression. I need the text in bold
I came this far: (?<=Melding)\s+(.*)\s )

Sample:

Aanhef Dhr.

Naam Reormon

Voorletters

Bedrijfsnaam

Adres Reedhoisplain 341 -

Postcode

Plaats Darks

Telnr

Mobiel

Email


Melding

Geen warm water bij meerdere bewoners.
Melding doorgegeven aan Leehuis/ Vart, geeft door een ander nummer te bellen, 0786-8974733,
dit is ook Leehuis, maar dan andere vestiging (Bealenbilt).
Melding aldaar aan Andre doorgegeven.


Historie

Dit is de eerste versie. Er zijn geen voorgaande versies

@Nalube,

use this regex

Regex.Match(PDFString,"(?<=Melding\s).*?(?=\Historie)", RegexOptions.IgnoreCase).Value.Trim

@Nalube,

In the Full Expression give the pattern with double quotes “(?<=Melding\s).*?(?=\Historie)”

Hi,

Can you try the following?

"(?<=Melding\s*)([\s\S]*)(?=\s*Historie)"

Regards,

I think you are using a IsMatch activity, if you want o extract text from that string and have to assign it to a different variable then try this inside an assign activity.

Regex.Match(strInput,"(?<=Melding\s).*?(?=Historie)", RegexOptions.IgnoreCase).Value.Trim

Yes I’m using IsMatch

Hi,

Can you remove a space between “Melding” and “\s”. as the following ?

"(?<=Melding\s*)([\s\S]*)(?=\s*Historie)"

Regards,

1 Like

Thnx It works fine :wink:

1 Like

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