Adding special char to regex?

I have a regular expression that matches the three apostrophes types 'β€™β€˜. I directly inserted the last two words of Microsoft into the regular expression. However, when I test it, my regular expression fails, and when I test my javascript script check in firefox, I see 'Γ’β‚¬β„’Γ’β‚¬Λœ\instead 'β€™β€˜. Do I need to avoid them or use the ASCII format?

+5
source share
2 answers

Try

/['\u2018\u2019]/

This corresponds to one of 'β€™β€˜.

Explanation:

JavaScript- \u1234 Unicode 1234. , EditPadPro Unicode.

+1

unicode :

/\u0022/ // matches "
/\042/ // matches "
+3

All Articles