Live data from Hacker News

Regex Golf

regex.alf.nu

21–30 of 189 posts

Re: Regex Golf

#21

For "6. A man, a plan", I thought it was impossible to match palindromes with regex, am I wrong?

It gives you hints below the score, for 6 it's:

  You're allowed to cheat a little, since this one is technically impossible.
No idea how you cheat...

EDIT, SPOILERS: I get 170 with ^(.?)(.)(.).?\3\2\1$

Re: Regex Golf

#23

For "6. A man, a plan", I thought it was impossible to match palindromes with regex, am I wrong?

It gives you hints below the score, for 6 it's: You're allowed to cheat a little, since this one is technically impossible. No idea how you cheat... EDIT, SPOILERS: I get 170 with ^(.?)(.)(.).?\3\2\1$

176 with ^(.)(.).*\2\1$
Post reply on HN