Help for this page

Select Code to Download


  1. or download this
    $s = '<COMMA>pre-stuff<EXHIBITING>some stuff</EXHIBITING>post-stuff</C
    +OMMA>';;
    
    print "$1 :: $2" while $s =~ s[<(\D+)>([^<]*?)</\1>][]gi;;
    EXHIBITING :: some stuff
    COMMA :: pre-stuffpost-stuff
    
  2. or download this
    $s = '<COMMA>pre-stuff<EXHIBITING>some <= stuff</EXHIBITING>post-stuff
    +</COMMA>';;
    
    print "$1 :: $2" while $s =~ s[<(\D+)>([^<]*?)</\1>][]gi;;
    {zilch here}