Back references

Pattern Matches
(to) (be) or not \1 \2 Match to be or not to be
([^\s])\1{2} Match non-space, then same twice more   aaa, …
\b(\w+)\s+\1\b Match doubled words
Comments