June 1st 2009 - 2nd Annual (Inter)?National Regular Expression Day!

Posted June 1, 2009 at 9:30 AM by Ben Nadel

Due to all the traveling that I've been doing lately, (Inter)?National Regular Expression Day snuck on me and I didn't have much time to prepare anything! But, it's not too late - today, June 1st 2009, is the second annual (Inter)?National Regular Expression Day and the celebration will happen!

 
 
 
 
 
 
(Inter)?National Regular Expression Day - A Celebration Of Powerful String Manipulation! 
 
 
 

As you all know, regular expressions are an extremely powerful way to match patterns in strings for both search and replace actions. The Regular Expression is a great tool to have in the toolbox and one that is most definitely worth celebrating. If you have no idea what a Regular Expression is, sometimes referred to as "RegEx", I highly recommend that you look at my Introduction to Regular Expressions blog post. I think that once you start getting into them, you'll never go back to working without them.

The Contest

Prize: $100 Amazon.com Gift Certificate

This year, the contest will be in relation to regular-expression-based Twitter filtering. Twitter is a sort of public chat application in which you have to subscribe to follow people's "Tweets" (aka. status updates). The more people you follow, the more Tweets you receive. Once you start to follow a large number of people, the amount of noise that you receive via the Twitter stream makes effective communication almost impossible.

As a result, I feel that complex filtering is going to start playing a huge part in the Twittersphere. To be entered into the contest, post a comment with a regular expression that you feel would help filter out some of the junk that comes through the Twitter stream. For example:

  • (breakfast|lunch|dinner)
  • beer[^\w]o[^\w]clock
  • listening to:

Enter your comment and regular expression filter by the end of the day tomorrow, June 2nd, 2009, and you will be placed into contestant pool from which a winner will be randomly selected.

Now go get your pattern-matching on!




Reader Comments

Jun 1, 2009 at 10:02 AM // reply »
15 Comments

@[^ ]+\W\w+$


Jun 1, 2009 at 10:10 AM // reply »
10,744 Comments

@Pete,

What are you doing here? Filtering out other people's back-and-forth conversations?


Jun 1, 2009 at 10:20 AM // reply »
7 Comments

Oh jeeeez, how about International Children's Day?

P.S: damn u're still handsome!


Jun 1, 2009 at 10:26 AM // reply »
10,744 Comments

@Serene,

Regular expressions are far more powerful than children :)


Jun 1, 2009 at 10:28 AM // reply »
7 Comments

Like I said: jeeeeeeez!


Jun 1, 2009 at 10:46 AM // reply »
15 Comments

@Ben - filtering out one word replies like "@bennadel thanks"


Jun 1, 2009 at 10:49 AM // reply »
10,744 Comments

@Pete,

Ahh, gotcha. Good thinking.


Jun 1, 2009 at 11:07 AM // reply »
13 Comments

To be on the comical side :)

(?i)(\.net|asp.?|microsoft|ms)


Jun 1, 2009 at 12:09 PM // reply »
11 Comments

Block all requests to retweet/digg etc.

/please\s+?(RT|retweet|read|digg|stumble|fav|bookmark|upvote|comment)/i

And, to block all retweets:

/(^|\s)(RT|retweet(ing)?)\s/i


Jun 1, 2009 at 3:01 PM // reply »
29 Comments

^(..)*$
matches all even tweets (in my mind, didn't test it). thus probably cuts the tweet flood in half ;)

ok if that doesn't count. this (hopefully) recognizes all "I'm listening to whatnot" tweets/blips
http://blip\.fm


Jun 1, 2009 at 6:42 PM // reply »
10 Comments

[zZ]{3,}
Going to bed now... okay, so don't tweet then ;-)


Jun 1, 2009 at 8:12 PM // reply »
12 Comments

The thing I like most about Twitter is finding out what the people I like are likin' (or hatin') on.

(like|cool|sucks|hate|awesome|love|great|free|naked)

Sorry, I couldn't resist throwing the "naked" in there. I don't think I've ever even seen the word come up, but you know...just in case!


Jul 9, 2009 at 1:57 PM // reply »
10,744 Comments

Hey guys, sorry for taking FOREVER to announce the winner. Unfortunately, outside constraints were holding me back and yada yada yada it's over a month later the winner of the 2nd Annual (Inter)?National Regular Expression Day contest is:

Master of security, Pete Freitag

Congratulations Pete - I'll be in touch via email.


Jul 9, 2009 at 2:42 PM // reply »
15 Comments

Wow thanks Ben, you Rock!!



Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
InVision App - Prototyping Made Beautiful With Prototyping Tools Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 22, 2012 at 5:01 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
This is great discussion. Thank you Ben and Steven for elaborating. I'm with Andy. I can fully get my head around the theory of MVC and Service layers, but a careful examination of an actual (fr ... read »
Roe
May 22, 2012 at 3:52 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
This is a great summary and an excellent primer for MVC development. I will caution you on using cfc's for the view and instead point you to model-glue as a framework. Not only will using this framew ... read »
May 22, 2012 at 3:25 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
Oh and +infinity on using FW/1. ... read »
May 22, 2012 at 3:23 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
@ben When you get down to controllers/views it really is 6 of 1 half dozen of the other. That's the beauty of having all the business logic tucked away in the service layer. You can have: * 2 contr ... read »
May 22, 2012 at 2:57 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
@Andy, Thanks! I'm exciting to actually be making some progress on this front. Not sure what the directory structures would be (my controller code is still in a folder called "content"). ... read »
May 22, 2012 at 2:37 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
Typo Now this is only one way of handling it should read Now this is not the only one way of handling it @David In theory the controller should be extremely light with no contructs such as loopin ... read »
May 22, 2012 at 2:12 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
I'm wondering anyone has any thoughts on Mach-II and what the controller actually consists of (just the XML file or the XML file plus listeners/filters ). The reason I ask this is that i'm increasin ... read »
May 22, 2012 at 1:49 PM
A Better Understanding Of MVC (Model-View-Controller) Thanks To Steven Neiland
Nice post, Ben! There are a lot of confusing MVC descriptions out there, but this does a really good job of summing up the different aspects of (in my opinion) a properly structured MVC application. ... read »