Extracting the city of an adres with Regex

Hi Everyone,

Can someone tell me which Regex formula i have to use to extract the city of an adres like:

Adres: Korte Leegte 75
9641PE Veendam

In this case Veendam, or

Adres: Kanaalstraat NZ 80 B
7020HH Nieuw- Weerdinge

This one is Nieuw-Weerdinge

Thanks!

give a try on:
grafik

Hi @s.altindag

Use Assign Activity

LHS → Create a variable (String)
RHS → System.Text.RegularExpressions.Regex.Match(“Input String”,“(?<=\d{4})[A-Za-z]{2}\K\s(.*)”).Tostring

image

Regards
Gokul

@s.altindag

Try :
Regex.Match(“9641PE Veendam”,“(?<=[\d+]{4}[A-z]{2} )[A-z].+”).ToString

Screenshot (108)

Hi,

Thanks you so much, it worked!

Hi,

This also worked, thanks!!

Perfect.
May we ask you to close the topic once the final testing was sucessfully? Thanks

Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

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