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 »
11,314 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 »
11,314 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 »
11,314 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 »
11,314 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
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Jun 19, 2013 at 2:01 PM
Experimenting With The Amazon Simple Storage Service (S3) API Using ColdFusion
I have coincidentally been beating my head against the S3 API for the last week or so. One big "gotcha" I had to work around was file names and paths containing spaces. Remember to URL Enco ... read »
Jun 19, 2013 at 1:27 PM
Using Slice(), Substring(), And Substr() In Javascript
very good article. By the way IE supports negative values in substr or slice in verson 10. ... read »
Jun 19, 2013 at 11:33 AM
Filter vs. ngHide With ngRepeat In AngularJS
In your assessment, is it correct to say that given a list of say 500 items its more performant to use the `ngHide` method over the `filter` method? ... read »
Jun 19, 2013 at 10:18 AM
ColdFusion Path Usage And Manipulation Overview
Anyone happen to know if the file created by getTempFile will be automatically removed at any point? Nothing mentioned in the docs, and restarting CF doesn't remove them, so it seems it needs manu ... read »
Jun 19, 2013 at 9:41 AM
Working With Inherited Collections In AngularJS
I actually just ran into this same situation with a demo I was putting together. Your implementation of multi-lvl $scope's > Mine :) ... read »
Jun 19, 2013 at 8:17 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
@Prateek, to match a word or text you should use .toContain('word') that's a jasmine reference. website is : http://pivotal.github.io/jasmine/ ... read »
Jun 19, 2013 at 8:10 AM
My Experience With AngularJS - The Super-heroic JavaScript MVW Framework
Hi Guys, Actually i am doing e2e test of angular js of my project but i am not getting one thing that is how to press enter key through the test when my form is filled as i am not using a button but ... read »
Jun 18, 2013 at 9:20 PM
Mapping AngularJS Routes Onto URL Parameters And Client-Side Events
I couldn't find examples of passing multiple arguments using the when() routing statement so figured out through trial and error that you can pass multiple arguments using the following format: .whe ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools