Regular Expressions 101

Community Patterns

Find words that are duplicates

0

Regular Expression
PCRE (PHP <7.3)

/
\b(\w+)\b(?=.*\b\1)
/
gm

Description

marks words which are found more than once in the string

Submitted by anonymous - 5 years ago