Regexr Formula Help for Date - Urgent

Hi all, is anyone able to come up with a Regex Formula to obtain the full director’s address using the word director as an anchor? Please help thank you!

EVELYNN JGLER (EVELYN JGLER) 12341231J SINGAPORE CITIZEN ACRA 13/03/2020

OPIANG LASAI 31 FAOERAON Director
#01-12
THE DEFAULTROOM
SINGAPORE (4123412)

DOMONITRICS ONTHEROLL AN412341 GREEK ACRA 01/06/2018

MOUNT.BATATAWE 31231, WEWET 1341234, ATHENASHIELD, Director
JERMAICA

BOON LAI TAOK (BOOK WEW LAI) S12341234Z SINGAPORE CITIZEN ACRA 13/03/2020

DANG LAS SIOT STREET 43 Secretary
#12-2102
CITY SOAPW @ CSDAPO
AFRICA (12341)

Hi,

Can you try the following pattern using Matches activity?

"(?<=^|\n).*?Director[\s\S]*?(?=\r?\n\r?\n|$)"

Regards,

Hi @Kian,

This will take every paragraph that contains the word director:

^.*Director$(\n\S.*$)+

1 Like

Hi @Yoichi, I tried to input this formula onto Regex101.com but it doesn’t extract anything. :frowning:

Hi @Gabriele_Camilli, thank you for the formula :smiley:, but is there a way to tweak the formula so as to obtain only the address, excluding the word director itself?

Hi,

regex101 is not 100% compatible with .net regex.

Can you try the following sample?

Sequence.xaml (6.8 KB)

Regards,

@Yoichi ohh i see thank you! But then is there anyway to tweak the formula so as to obtain only the address, excluding the word director itself?

It is probably possible, but i would suggest to just use a Replace statement on a string variable, replacing “Director” with “”

Could this work for you?

@Gabriele_Camilli okei thank you for the tip! :smiley: However currently I’ve tried placing the formula in and my flow runs, however UiPath is unable to extract the information out even though the process runs successfully :frowning:

What does you see if you put a breakpoint after the extraction? Can you check the variables?

@Gabriele_Camilli Im sorry but how do I check it :sweat_smile: im an UiPath dummy. Below is my current UiPath file, would you mind helping me see if I did something wrong?

REGEX.xaml (27.0 KB)

Hi @Gabriele_Camilli, I am still unable to achieve an output in my UiPath. Is there any way to solve it?