![]() |
|
more useful options | |
PerlMonks |
How to Ask A Regex Question (With Test::More)by tphyahoo (Vicar) |
on Jul 29, 2005 at 13:11 UTC ( #479480=perltutorial: print w/replies, xml ) | Need Help?? |
This is the second post in the How To Ask a Question (With Test::More) series, and assumes you have read the first, main post.
In this installment, we learn how to use Test::More::like($string, $regex) and the qr quotelike operator to ask regex questions in a sane way. Let's dive right in. ******************BEGIN QUESTION TEMPLATE************************ O Wise Monks, I can't get this regex to do what I want it to do. As you can see, it fails two tests. I'm on Windows XP system using the standard ActiveState perl distribution. I got both standard and error output out of my test, into one output file, by running this with emailsregex.pl > output.txt 2>&1 output.txt. The output I got was
What the heck am I doing wrong? ******************END QUESTION TEMPLATE************************ (Debugging the regex is left as an exercise for the reader.)
Back to
Tutorials
|
|