Can't get value when using Matches activities

Hello,

I’m using regex to get value in string but when i get string ( this string is body mail of outlook) the result has “@” before String. if have that character i can’t using regex to get value i wan’t
I’ve test if i delete that character my regex activites will run correctly
Any idea to delete that one ?

Here is my regex test :
https://regex101.com/r/r7xRjF/1

@LucastoH - I didn’t get you…Could you please explain with some example?

1 Like

i can’t update picture because company policy
You can check my test String in website test regex and will see in the top of string will have the character “@” before "

Then activities Matches in uipath or using regex by code in uipath can’t get value i want in that string

Hi,

Can you try the following sample?

Sample20210507-2.zip (2.9 KB)

The pattern will be

(?<name>.*)\r?\n\r?\n(?<Role>.*)\r?\n\r?\nDOB:\s+(?<DOB>\d{2}-\w{3}-\d{4})\r?\n\r?\nEmail:\s+(?<Email>.*)\r?\n\r?\nMattermost:\s+(?<Mattermost>.*)\r?\n\r?\nSkype:\s+(?<Skype>.*)

Regards,

2 Likes

it’s working :smiley: can you explant what you do in my pattern ?
many thanks

Hi,

It’s line break matter. Your pattern :\r?\n\n works when the linebreak is LF, but not when the linebreak is CRLF. So it should be \r?\n\r?\n . This works in either LF or CRLF.

Regards,

1 Like

oh noted, thank you so much :smiley:

1 Like

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