The 6th Annual Regular Expression Day (And Prizes) - June 1st, 2013
Holy cow! I can't believe that it's been six years since we launched the first International Regular Expression Day in honor of one of the most powerful tools in programming history - pattern matching. From validating email addresses to parsing CSV files to transforming data, regular expressions make our lives better; they make our software stronger; and they kind of, sort of, just a little bit make us feel like super bad-asses.
NOTE: If you are already completely lost and have no idea what I'm talking about, please checkout my video and slide presentation - Regular Expressions, Extraordinary Power. They will blow your mind and change your world forever.
Now, as with all previous years, this celebration has snuck up on me and I find myself woefully underprepared. I know what you're thinking, "classic Ben!", right?! So, unfortunately, I'm gonna take the easy way out and do something that I've always wanted to try - running a Twitter campaign. This year, in honor of the Regular Expression, I'm giving away an iPad Mini. And, in order to enter, all you have to do is tweet the following message (click the image below):
|
|
|
||
|
|
|||
|
|
|
Since Regular Expression Day falls on a Saturday, I'll hold this open until Friday, May 31st - 3PM EST. At that time, a winner will be randomly selected from all the tweets!
Have fun and have a wicked awesome Regular Expression Day!!!!
Winner Update
Congratulations to Kyle Doge for his winning tweet!
|
|
|
||
|
|
|||
|
|
|
Thank you all for participating. And, remember, if you use Regular Expressions, you're already a winner!
Reader Comments
Dumped my Twitter account months ago and the CAPTCHA to reactivate is unreadable by man, machine, or beast.
Yay! RegEx Day is back! Our family baked and decorated a cake last year in it's honour. A tweet is a lot easier (and less messy). Thanks Ben!
No RegEx competition this year? :(
@Matt,
Ha ha ha, they finally found a way to keep the humans out!
@Seth,
Just didn't have time this year :( I thought it would be fun to have been tweet regular expression patterns than would match their twitter handle... but, maybe next year when work / life is not so busy!!
@Matt,
Less messy, but significantly less delicious :D
I tried a few more times and none of the CAPTCHAs cleared.
And I no longer care- Twitter was never that important to me.
If it's okay with you, I can just post my entry here.
Matt, no worries :D
(?:[Rr]osencrantz|[Gg]uildenstern)(?=([\w\s]*Hamlet))
If Hamlet is after Rosencrantz or Guildenstern, he captures them.
Sample data:
Rosencrantz Hamlet
Guildenstern Hamlet
Guildenstern Rosencrantz Hamlet
RosencrantzHamlet
rosencrantz Hamlet
guildenstern Hamlet
guildenstern rosencrantz Hamlet
Ophelia Guildenstern Rosencrantz Hamlet
Guildenstern Rosencrantz
(Hamlet doesn't capture Ophelia. He likes her.)
Tested at http://regexpal.com/
I'm afraid my expressions would be less than regular if I had an iPad
Since I read the whole blog series from a. cameron, i see even more the power of REGEx...now I need to get into it more than I have...This is a reminder of that. Now the iPad Mini would be an even bigger reminder :)
@Dan,
Yeah, Adam did a great series on RegEx - he is a blogging machine these days!
Congratulations to Kyle Dodge for his winning tweet!
And thanks to all who participated!
I decided to post 2 simple patterns that I use often when looking thru log files
#Remove log lines not containing 'text'
^(?![^\r\n]*text)[^\r\n]+[\r\n]+
#Remove log lines containing 'text'
^[^\r\n]*text[^\r\n]*[\r\n]+
Congrats Kyle. Lucky punk! If it's missing from your office one day, I think you'll know who took it. :)
Congratulations Kyle. Your chickens are clearly sweeter than the rest of the twitter-sphere.
@Carlos,
"Your chickens are clearly sweeter than the rest ..."
Ha ha ha! Awesome.