Help for this page

Select Code to Download


  1. or download this
    while ($text =~  m|<jobnumber>(.*?)</jobnumber>.*?<location>(.*?)</loc
    +ation>|sg) {
            print "Found job number $1 in location $2 \n";
    }
    
  2. or download this
    my $regexp = '<post>';
    $regexp .= "(?=.*?<$_>(.*?)</$_>)" foreach qw(jobnumber location);
    ...
    while ($stuff =~ m|$regexp|sog) {
            print "Found job number $1 in location $2 \n";
    }