Help for this page

Select Code to Download


  1. or download this
    our $qr=qr/<(?:[<>\\]+|\\.|(??{$qr}))*>/;
    print "not " unless '<<><><<<>>><>>'=~/^($qr)$/;
    print "ok - $1\n";
    
  2. or download this
    print "not " unless '<<><><<<>>><>>'=~/^((?&:<(?:[<>\\]+|\\.|(?:&))*>)
    +)$/;
    print "ok - $1\n";
    
  3. or download this
    my $rules=qr/(?&& # compile this stuff, but dont match it
                 (&foo: .... ) # define ...
    ...
                 )
               /x;
    if ($blah=~/(&foo)(&bar)$rules/) { ... }