Help for this page

Select Code to Download


  1. or download this
    my $xpath = 'BoringNode[1]/InterestingNode[@InterestingAttribute="outg
    +rabe"]/AnotherBoringNode[@BoringAttribute="grey"]';
    $xpath =~ /(InterestingNode\[.*?\])/;
    $1 =~ /"(.*)"/;
    print $1 . "\n";
    
  2. or download this
    $xpath =~ /(InterestingNode\[@.*?"(.*?)".*?\])/;
    print $2 . "\n";