RegexWars
Tier 3 · Warlockmatch

Said It Twice

Match text where the same word appears twice in a row.

A backreference \1 matches whatever group 1 actually captured — not the pattern again, the text. This is the classic duplicated-word bug your editor highlights.

Your pattern0 chars · par 14
//
Flags
Start typing — tests run as you go.0 of 5 visible tests passing
Test cases
  • the the catmust match
  • hello hellomust match
  • a amust match

    any run of whitespace between them

  • the catmust not match
  • the theatremust not match

    theatre merely starts with the

+ 4 hidden tests, checked when you submit. They are what stops a pattern that only fits the examples above.