topical media & game development
basic-regex-26-RegexTester.pl / pl
#!/usr/bin/perl -w
use strict;
print "This is a simple Regular Expression Tester.\n";
print "First, enter the pattern you want to test.\n";
print "Remember NOT to escape metacharacters like \\d with an extra \\ when you supply a pattern on the command line.\n";
print "Enter your pattern here: ";
my myPattern);
print "The pattern being tested is 'myPattern/)
{
print "Matched '_'\n";
print "\nEnter another test string (or Ctrl+C to terminate):";
}
else
{
print "No match was found for '_'.\n";
print "\nEnter another test string (or Ctrl+C to terminate):";
}
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.