Regular Expressions 101

Community Patterns

Community Library Entry

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 - 10 years ago