Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at RIA Unleashed (Nov. 2009) with:

Video Presentation: Regular Expressions, Extraordinary Power

By Ben Nadel on
Tags: ColdFusion

I first learned how to use Regular Expressions (aka RegEx) about 6 or 7 years ago for the purposes of data cleaning. I would take massive Excel files, paste them into Macromedia Homesite, and then use the Find/Replace feature to strip out all the extra spaces, tabs, and commas. It was tedious work; but, I am tremendously thankful that I had to do it because learning Regular Expressions has more than paid for itself in terms of programming efficiency.

Frankly, Regular Expressions are amazing! They're almost magical. But, they are complex, which is why so many developers shy away from them. In this video presentation, I do my best to try and break down Regular Expressions into tiny, bite-sized components that you can much more easily wrap your head around. And, hopefully, by the end, you can start to see the kind of potential that Regular Expressions provide.

 
 
 
 
 
 
Video Presentation: Regular Expressions, Extraordinary Power - an introduction to regular expressions in programming. 
 
 
 

To watch the video presentation, click here. If you don't want to sit through whole video, which is about an hour long, click here to view the slides directly.

And, don't forget! International Regular Expression Day is June 1st! It's the 4th annual day of celebration in praise of powerful string manipulation! We'll be giving out fun prizes and just reveling in the awesome glow of Regular Expression goodness.

 
 
 
 
 
 
International Regular Expression Day 2011 - June 1st, 2011. A celebration of powerful string manipulation! 
 
 
 

Stay tuned for more information on Regular Expression Day.




Reader Comments

Ben

First things first,
Ben Nadel is Awesome.

I have always been a bit wary and confused by the power and complexity of regular expressions.
Being at your talk at SOTR2011 - in typical fashion you broke it down into simple concepts and very quickly had me understanding it a lot better and in much greater depth.

Thanks for posting the slides and video!

Cheers
Marty

Reply to this Comment

@Lola,

Heck yeah there is :D

@Martin,

Thanks a lot - it's really nice to hear that this stuff came out a bit less intimidating than it might normally. The basic building blocks of regular expressions aren't too bad; it's that the combination of those building blocks can quickly get quite complex!

Reply to this Comment

I liked the way you broke down the string and formed the regular expression. It made it easy to follow.

Reply to this Comment

There is definitely some point when working with REGEX that it clicks. If you don't get to that point, then you are perpetually stuck trying to avoid them or mashing keys in a regex tester until it works but you don't know why (I've spent hours with yours, Ben).

I imagine many people are in that position above when it comes to hobbyist or part-time programmers. For me, it clicked when tackling a really complex reg-ex. I had to use so many expressions, that I had to actually analyze the problem and solution more thoroughly than ever before. In fact, the regex testers were probably a handicap that prolonged my regex avoidance.

I would also like to request more pictures in celebration of regex day. I have no specific requests, but we should have something to celebrate, right?

Reply to this Comment

@Justin,

I completely agree - this kind of stuff doesn't really click until you try it out in the field, so to speak. And even then, there's stuff that is just always complex. I've been loving RegEx for years and I still get tripped up and things don't work like I expect them to.

Pictures... I'll see what I can do :)

Reply to this Comment

Great presentation @ NYCFUG, Ben. You really helped fill in some of the missing pieces for me.

And, today, I used what I learned to debug some htaccess rules that were giving me problems!

Reply to this Comment

@Aaron,

Thanks my man! HTAccess stuff can be such a pain to debug! URL rewriting stuff in general is a pain because seeing where things are going wrong is never easy with CFDump :D

Reply to this Comment

Thanks for a great presentation, Ben! I enjoyed it and it really took some of the mystique out of RegEx.

Reply to this Comment

@Candace,

My pleasure! It was also good running into you at the NYC UPA last night. Those presentations are so cool.

Reply to this Comment

@Ben, I am somewhat of a UX fresk, but I don't get to use it much currently :(

So, I entertain and educate myself at the meetups, etc.

And it was GREAT to see you an Clark's familiar, lovely faces. :D

Reply to this Comment

@Candace,

Ha ha, thanks :) I'm trying to get much more into UX which is interesting, trying to constantly not worry about code, just about experience. I'm sure I'll see you more meetings then.

Reply to this Comment

Awesome presentation. However I have a request for the HTML presentation. Could you possibly have "Next" and "Prev" buttons for navigation instead of clicking anywhere? One, because when I select some text to copy it, it goes to the next slide. And two, it would be easier to go backward instead of adjusting the url. Thanks!

Reply to this Comment

@WinterJunkie,

You can use the left/right arrows to help you navigate between the slides. But, I agree on the copy-paste stuff. I have also felt that problem with my own slides :(

Reply to this Comment

@WinterJunkie,

Even with the left/right, you are still correct - you can't copy and paste (at least not easily without losing the current slide). It is an experience that could easily be improved.

Reply to this Comment

Hi Ben.

Hey, just wanted to say thanks for this video tutorial. It really helped me create some regex solutions for front-end data validation.

Keep up the good work.

Chris

Reply to this Comment

Ben:

Thanks for taking the time to make this video and post it for all to see.

I've been around pattern matching for a long time, mostly using OmniMark. I've only used RegEx when working in ColdFusion and then just scratching the surface of it. I was surprised that RegEx has a look ahead function, something I used a lot in OmniMark.

Also, I appreciated your off-topic comments and felt the compassion in your voice regarding making it comfortable for users. In the old days, it seemed like programmers were often lazy and would not go the extra mile to make things easier for users. I hope that has changed.

Tanks again!

Reply to this Comment

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Oops!
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.