“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.

10 thoughts on ““If you love regexes so much, marry them””

  1. 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.

  2. 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

  3. 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”.

Leave a Reply

Your email address will not be published. Required fields are marked *