Pages

Thursday, November 7, 2013

The best site on the web for newbies to learn Regular Expressions with simple, interactive examples

Source: https://wiki.cercomp.ufg.br/Equipe_Web/RoR/Express%C3%A3o_Regular (see the white arrow?)

I'm in the process of learning regular Expressions (regex). What is regex? Simply put, regex is
"a special text string for describing a search pattern. So that we can think of regular expressions as wildcards on steroids. we are probably familiar with wildcard notations such as *.txt to find all text files in a file manager. The regex equivalent is.*\.txt$." (Source)
Why do I need to learn regex? Simple. To create complex Moodle quiz questions! Here is one such Moodle question type - the Perl-Compatible Regular Expression (Preg). To use this advanced question type, you have to read and wade through Moodle.org's detailed help page on the Preg question type.

To write good quiz questions, I need more power, Scotty! Regex code is goobledegook to me unless I can clearly see the nuances and intricacies of the regex syntax. You also need to have a understanding of Regex basics otherwise you can end up looking pretty foolish on Stackoverflow. Case in point.

The best site for newbies to learn regex, in my humble opinion, is...drum-roll....

for these four reasons:

  1. You get to learn regex in bite-sized pieces;
  2. There are mini-quizzes to test your understanding;
  3. Each quiz question has a solution with a clear explanation
  4. I love it!
I hope this website helps you too.

Go forth and program your search strings with regex!
Frankie Kam

Other related regex links.
Regex tester http://gskinner.com/RegExr/
Regular Expressions Tutorial http://www.regular-expressions.info

If you like this post or site
a small donation would be nice but would last only a day,
otherwise leaving a comment (or a compliment) below will last me a month!

No comments:

Post a Comment

Ratings and Recommendations by outbrain