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

Excluding doubled consonants that have the same vowel on both sides of the pair:

  ^((?!([aeiou])([^aeiou])\3\2).)*$
The following also works for the testcases and is shorter:

  ^((?!(.)(.)\3\2).)*$



Can get 2 more points with:

  ef|^((?!(.)\2).)*$
But I reckon yours wins for having a pair of breasts in the middle




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

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

Search: