Regex pattern including all special characters

Please don’t do that… little Unicode BABY ANGELs like this one ๐Ÿ‘ผ are dying! โ—•โ—กโ—• (โ† these are not images) (nor is the arrow!)

โ˜บ

And you are killing 20 years of DOS ๐Ÿ™‚ (the last smiley is called WHITE SMILING FACE… Now it’s at 263A… But in ancient times it was ALT-1)

and his friend

โ˜ป

BLACK SMILING FACE… Now it’s at 263B… But in ancient times it was ALT-2

Try a negative match:

Pattern regex = Pattern.compile("[^A-Za-z0-9]");

(this will ok only A-Z “standard” letters and “standard” 0-9 digits.)

Leave a Comment