Regular Expressions 101

Community Patterns

Remove Special Ascii Characters from unicode String

11

Regular Expression
PCRE (PHP <7.3)

/
[^\p{L}\s._0-9\-]+
/
g

Description

By Using this string you can just remove ascii special characters from a unicode string characters like ♥♥♥♥ ▓▒ and other non unicode letters.

Submitted by Hummad Hassan - 9 years ago