Regular Expressions 101

Community Patterns

Alpha Numeric with International characters

0

Regular Expression
PCRE2 (PHP >=7.3)

/
[\p{L}|\p{N}|\s]
/
gu

Description

Alpha Numeric with International characters with space

This matches any letter, number, or space in most languages.

  1. [...] -> Match with conditions
  2. [a|b] -> Match 'a' OR 'b'
  3. \p{L} -> Match any letter in any language
  4. \p{N} -> Match any number in any language
  5. \s -> Match a space
  6. /g -> Don't stop after first match
  7. /u -> Support unicode pattern matching
Submitted by Dinesh Swami - 3 years ago