Live data from Hacker News

Regex Golf

regex.alf.nu

11–20 of 189 posts

Re: Regex Golf

#11
post #6

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)

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).)*$

Re: Regex Golf

#15
post #7

[deleted]

Indent your regexes by two spaces and precede them with a blank line, that will preserve asterisks ;)
Post reply on HN