Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
shdon
on Dec 20, 2013
|
parent
|
context
|
favorite
| on:
Regex Golf
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).)*$
surreal
on Dec 20, 2013
[–]
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: