Regular Expressions for Dummies

Regular Expressions for Dummies: Screencast Series

Nov 10th, 2009 in Screencasts by Jeffrey Way

Over the course of a handful of video tutorials, I'm going to teach you how to use regular expressions effectively in your Javascript and PHP applications. As always, I'll assume you know absolutely zip.

PG

Author: Jeffrey Way

Hi, I'm Jeff. I'm the editor of Nettuts+, and the Site Manager of both ThemeForest, and CodeCanyon. I spend too much time in front of the computer and find myself telling my fiance', "We'll go in 5 minutes!" far too often. I just can't go out to dinner while I'm still producing FireBug errors...drives me crazy. During my free time, I sporadically write articles for my own personal blog. If it will keep you in the good graces of the church, follow us on Twitter.

Editor's note - this series has been transferred to Nettuts+ from our sister site, ThemeForest. It was originally published in early 2009 by yours truly.

Lesson 1: Introduction


Lesson 2: Matching


Lesson 3: Validating Email Addresses


Lesson 4: Javascript and "Replace"


Lesson 5: Preg_match_all, and Scraping Data



Related Posts

Check out some more great tutorials and articles that you might like

Enjoy this Post?

Your vote will help us grow this site and provide even more awesomeness

Plus Members

Source Files, Bonus Tutorials and
More for $9 a month for all TUTS+
sites in one subscription.

Join Now

User Comments

( ADD YOURS )
  1. PG

    David Moreen November 23rd

    Oh man Jeffrey, I needed this really bad. One thing that I still have yet to master/learn and don’t look forward to is regular expressions. I suppose now is a better time then ever…

    ( Reply )
    1. PG

      Jeffrey Way November 23rd

      Hey David – it’s not as hard as it looks. :) I promise. I have a more extensive article coming out later this week (Thursday) which should help as well.

      ( Reply )
  2. PG

    Joao Aliano November 24th

    love them meat ‘n potatoz
    reg ex with lotsa gravyie, plz

    ( Reply )
  3. PG

    Fahim November 25th

    Hey Jeffrey, loving the videos especially about this topic. It can be so powerful once you grasp the findementals.

    If you can, it would be nice if you could do a short video tutorial on how to apply this on .htaccess files for redirecting, clean urls etc.

    Keep up the good work.

    Fahim (http://fswebsolutions.com)

    ( Reply )
    1. PG

      Hussein Duvigneau December 3rd

      Agreed, vote++ for tutorial on regex + redirect!

      ( Reply )
  4. PG

    parvez November 27th

    oh really love it :0 thanks man u great :D

    ( Reply )
  5. PG

    Sajid Ali December 5th

    Thank you very much, i was hoping for such a great tutorial.

    Really helpful.

    ( Reply )
  6. PG

    Anonymous December 5th

    As you have told in the beginning,
    “this series has been transferred to Nettuts+ from our sister site, ThemeForest.”

    I would like the actual ThemeForest links for all 5 video, so i can go there and see the actual comments that users had made.

    I hope it can help us.

    ( Reply )
  7. PG

    David December 13th

    How come I get an error.

    undifined variable? I think I am ready to retire. I’ll go and bother my wife for few hours. Maybe, That makes me happy for a while. Stress!!

    $test = ‘model1=David1&listed1=555.00&net1=555.00&model2=David1&listed2=555.00&net2=555.00′;

    preg_match_all(‘/-\d+\=/i’, $test, $sorted_new);

    foreach($sorted_new[1] as $str) {
    echo $str.”";
    }

    ( Reply )
  8. PG

    Radoslav December 30th

    David, you search for matches[1], but no “()” was defined in pattern :) close the sting in () what you want…

    ( Reply )
  1. Arrow
    Gravatar

    Your Name
    December 30th