This is a great summary how to use regexps, complete with some very nice examples. Thank you!
Just so long as it doesn't blindly modify "that that".
Right. You can just search for /\b(\w+) \1\b/ and see what comes up. There are usually false positives of one kind or another.
I once wrote a sentence with a double “in” in it — it was something like “let's see what state this is in in two weeks’ time” or similar — and at least two people commented thinking that it was wrong and needed an “in” removed...