Regular Expressions 101

Community Patterns

1...56789...902

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\b[a-z0-9]{6}\b
/
g

Description

StackOverflow RegEx, lower case letters and numbers, with exact length of 6

  • RegEx without boundary (1st try) [a-z0-9]{6}
  • RegEx with boundary (solution) \b[a-z0-9]{6}\b
Submitted by Nicolas Karg - 2 years ago