Regex Matches return empty matches despite working in RegEx Builder

As the image shows, I’m trying to match the client’s informations in the string
"\n Client ID: FY17206\n Client Name: Bradford Cleaver\n Client Country: Romania\n "
with the following pattern \:\s(.*?)\\n

As you can see in the screenshot, it seems I have correctly matched the desired element of the string.
But the output has no elements.

You can also find attached a quick activity to test it.

I’d appreciate any help!

Regex.xaml (6.6 KB)

1 Like

Hello @P_Botrel,

so you are trying to extract Client ID, Client Name and Client Country right??

You can try below patterns

for client ID : (?<=Client ID.).*

for client Name : (?<=Client Name.).*

for client Country : (?<=Client Country.).*

You can try here Regex



Ok the source of my mistake was that in debug mode, the raw string was displayed with \n, but the \n displayed here is just the special character return to the line.

In \:\s(.*?)\\n, I have replaced \\n by \n and it works better now, since I’m looking for the special character, not the literal string \n.


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