Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
[\w']*\p{L}*\w[\w.]*(?:-\w+.)?
/
gm

Description

Matches any word in any language. e.g. Montréal Hyphenated words count as one word. e.g. dinner-time Matches words with apostrophes . e.g. L'amour

Submitted by anonymous - 6 years ago