Flagrant Badassery

A JavaScript and regular expression centric blog

“If you love regexes so much, marry them”

…That's what a buddy of mine (who is in fact more than six years old) told me recently.

Here's an equivalent (albeit much more flexible and efficient wink) jibe, in regex:

(you)?(?(1)\u2665((?:reg(?:ular expressions?|ex(?:p|e[ns])?))++)|(?!))(?>\1\2)

This is just an attempt at über-geeky regex humor.

There Are 10 Responses So Far. »

  1. Dude…you need a hobby. Really. You’ve got *WAY* too much idle time… 🙂

  2. Heh. That may be, but this only took a few minutes of my idle time, and part of that was just looking up the character code for love. 😛 For the record, the RegexBuddy-style color coding thing is automated.

    People who fully understand the pattern (it uses a conditional, atomic group, etc.) will probably get a bit of a kick out of the implementation, though I already gave away the meaning.

  3. With blog posts like this, I’m afraid Steve won’t be marrying anyone or thing for a long time.

  4. Ah, but regexers get the best groupies.

  5. Steve, you promised marriage. Bowen, thank you.

  6. “regular expressions”, “regular expression”, “regex”, “regexp”, “regexes”, ok, but what’s “regexen”?

  7. The Anglo-Saxon, abbreviated, plural form. 🙂 I didn’t invent it.

  8. 1. My love of regex is not abnormal compared to you!
    2. You love regex yet are not mainly a Perl coder??
    3. The existence of regex in javascript = lol

  9. @Lizzy: I’ve never touched Perl. However, I am quite familiar with its regex flavor.

  10. This this has been getting a fair amount of StumbleUpon traffic recently for some reason, so I’ll note that for the sake of deriving some kind of meaning, I suggest you read the regex pattern as “If match ‘you’, match ‘[heart] regular expressions’, then place ‘you’ and ‘regular expressions’ in an atomic group; otherwise end the match”. It would match a string like “You♥RegexYouRegex”.

Post a Response

If you are about to post code, please escape your HTML entities (&, >, <).