RegEx Matches with special characters?

Hi fellas!

Does anyone know how to use Matches with input which might contain special characters, such as “(”, without messing up pattern?

:slight_smile:

. Dot will work

Hi
yah use this expression in MATCHES activity
“(\W)”

this will check for special characters
like this
image

Cheers @mikamol

1 Like

Add a \ before the special character you want to escape in your pattern.

Problem is i don’t know which special character it might contain :frowning:

Well, i don’t know where the special characters are.
I’m trying to match keywords to a page content, and i dont know if the keywords contains special characters or not.

1 Like

then to validate them we can use this expression in a IF condition like this
System.Text.RegularExpressions.Regex.IsMatch(yourstringinput.ToString,“(\W)”)
if true it will go to THEN part or goes to ELSE part

Cheers @mikamol