- or download this
$m = ' more gibberish"h" \n URL="http://[10.0.0.3]?id=80943lkjh875kjrv
+f09u548gfpi"\n gibber\n';
...
if ($m =~ $u) {
print "<$1><$2>\n";
}else{ print "no match u\n";}
- or download this
[tmp]> perl testResp2.pl
<><>
[tmp]>
- or download this
$u= qr/.*(?=U)(?:URL="([^"]*)")?/s # moves to just before 'U'
- or download this
$m = ' more gib U berish"h" \n URL="http://[10.0.0.3]?id=80943lkjh875k
+jrvf09u548gfpi"\n gibber\n';
...
if ($m =~ $u) {
print "<$1>\n";
}else{ print "no match u\n";}
- or download this
$p= qr/RESPONSE\sid="([^"]+?)"
.* #random XML
...
.* #random XML
(?:.*(?=U)(?:URL="([^"]+?)")?)*
/sx;