Hi fellas!
Does anyone know how to use Matches with input which might contain special characters, such as “(”, without messing up pattern?
Hi fellas!
Does anyone know how to use Matches with input which might contain special characters, such as “(”, without messing up pattern?
. Dot will work
Hi
yah use this expression in MATCHES activity
“(\W)”
this will check for special characters
like this
Cheers @mikamol
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
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.
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