Help for this page

Select Code to Download


  1. or download this
    [<>/]   # char that is "<", ">" or "/"
    
  2. or download this
    [^<>/]   # char that isn't "<", ">" or "/"
    
  3. or download this
    use Test::More tests => 2;
    
    ...
    
    $comment = '<Comment>foo < bar</Comment>';
    ok( $comment !~ m{<Comment>[^<>/]*</Comment>}, 'Detect <');
    
  4. 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