3 ms·
what's the pattern on "Abba"? I thought it was just to exclude doubled letters but I have doubles on two words on the left hand side as well (noisefully and eff
by bencoder 13y ago
what's the pattern on "Abba"? I thought it was just to exclude doubled letters but I have doubles on two words on the left hand side as well (noisefully and effusive, in case the word lists are the same)
- shdon 13y agoExcluding 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 13y agoCan get 2 more points with: ef|^((?!(.)\2).)*$ But I reckon yours wins for having a pair of breasts in the middle
- moron4hire 13y agowell, if you are strictly interested in matching with the fewest characters, regardless of the apparent pattern: ^(.)(.).*\2\1$
- danielweber 13y agoYour anchors at the end make it match nothing.
- moron4hire 13y agosorry, misreplied. This was for palindromes.
- abus 13y ago5. Abba (^unv|.u|z|ph|mi|st|vi|tan) haha