- or download this
[<>/] # char that is "<", ">" or "/"
- or download this
[^<>/] # char that isn't "<", ">" or "/"
- or download this
use Test::More tests => 2;
...
$comment = '<Comment>foo < bar</Comment>';
ok( $comment !~ m{<Comment>[^<>/]*</Comment>}, 'Detect <');
- or download this
$ perl -MTest::Harness -e'runtests @ARGV' 808525.t
808525.t .. ok
All tests successful.
Files=1, Tests=2, 0 wallclock secs
Result: PASS