For "6. A man, a plan", I thought it was impossible to match palindromes with regex, am I wrong?
You're allowed to cheat a little, since this one is technically impossible.
No idea how you cheat...EDIT, SPOILERS: I get 170 with ^(.?)(.)(.).?\3\2\1$
^(.)[^p].*\1$ # 177, "cheat a little"That said, 'regular expressions', as used in most programming languages, have extensions that extend the expressive power. One such extension is the matched group & backreference, used in other commentor's answers.
From a theoretic stance, these aren't really 'regular expressions', but that's what we call them in practice.