You're allowed to cheat a little, since this one is technically impossible.
EDIT, SPOILERS: I get 170 with ^(.?)(.)(.).?\3\2\1$
^(.)[^p].*\1$ # 177, "cheat a little"
EDIT, SPOILERS: I get 170 with ^(.?)(.)(.).?\3\2\1$