Hacker News new | past | comments | ask | show | jobs | submit login

well, if you are strictly interested in matching with the fewest characters, regardless of the apparent pattern:

  ^(.)(.).*\2\1$



Your anchors at the end make it match nothing.


sorry, misreplied. This was for palindromes.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: