Test your Regex 👇🏾
Go Home
Regex
/\b(\w+)\s(?=\1)/g
Input
my name is john and i would like some
tea
tea please
Match
Edit
Copy Regex URL