Regular Expressions 101

Community Patterns

eliminate repeated words

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(\b\w+\s)\1
/
igm

Description

mark a grup and then look if it comes after and make a substitution by only one

Submitted by anonymous - 2 years ago