How to check if a string has a certain pattern?


I need to check for a certain string variable if it verifies the pattern: Word Hello + Digits + Email account:

String 1 → “Hello 4938” Yes
String 2 → “Hello” No
String 3 → “434” No

Thank you.

the email pattern is done in a quick and dirty way:

Hello \d+ \b.*@.*\b

1 Like

Thank you. How can I get them once I verified the pattern is correct?

I mean how can I get the Digits and the Email?

Thank you.

go for this pattern

and use it within an isMatch activity are Regex.IsMatch statement

if the string is matching then extract the values with the help of Match activity or Regex.Match statement
refer to the groups and extract the different values:

have a play on

also have a look here: