Source: https://wiki.cercomp.ufg.br/Equipe_Web/RoR/Express%C3%A3o_Regular (see the white arrow?) |
"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:
- You get to learn regex in bite-sized pieces;
- There are mini-quizzes to test your understanding;
- Each quiz question has a solution with a clear explanation
- 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
Frankie Kam
Other related regex links.
Regex tester http://gskinner.com/RegExr/
Regular Expressions Tutorial http://www.regular-expressions.info
No comments:
Post a Comment