“If you love regexes so much, marry them”
Monday, June 11th, 2007 • Related • Filed Under
…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 ) 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.
Comment by Rob Wilkerson on 11 June 2007:
Dude…you need a hobby. Really. You’ve got *WAY* too much idle time… 🙂
Comment by Steve on 11 June 2007:
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.
Comment by Bowen on 12 June 2007:
With blog posts like this, I’m afraid Steve won’t be marrying anyone or thing for a long time.
Comment by Steve on 15 June 2007:
Ah, but regexers get the best groupies.
Comment by Katie on 17 June 2007:
Steve, you promised marriage. Bowen, thank you.
Comment by Jonathan on 5 November 2007:
“regular expressions”, “regular expression”, “regex”, “regexp”, “regexes”, ok, but what’s “regexen”?
Comment by Steve on 5 November 2007:
The Anglo-Saxon, abbreviated, plural form. 🙂 I didn’t invent it.
Comment by Lizzy on 26 November 2007:
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
Comment by Steve on 3 December 2007:
@Lizzy: I’ve never touched Perl. However, I am quite familiar with its regex flavor.
Comment by M HAmmad on 5 September 2014:
I Need Help To Make A Regular Expression ,
I Have Many Queries of SQL in a string examle one of them Create Table TableName
(
id type(size),
So on ….,
primary key(id)
)
I find Such Pattern From String ….
Any One Help Me ?
Comment by M HAmmad on 5 September 2014:
I Need Help To Make A Regular Expression ,
I Have Many Queries of SQL in a string examle one of them Create
Table TableName
(
id type(size),
So on ….,
primary key(id)
)
I find Such Pattern From String ….
Any One Help Me ?