Hello littleperl,
choroba is correct, of course, but for the record, this regex works:
use strict; use warnings; my $message =<<END; <abc name="rn" value="42"> <form method="post" action="login.lp" name="authform" id="authform"> <input type="hidden" name="rn" value="-1383135969"> <xyz name="rn" value="43"> END $message =~ /action\s*=\s*"login.*?".*?"rn"\s+value\s*=\s*"(.+?)"/s; my $rn = $1; print "rn = '$rn'\n" if $rn;
Output:
1:34 >perl 1180_SoPW.pl rn = '-1383135969' 1:38 >
Notes:
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: regex match after pattern
by Athanasius
in thread regex match after pattern
by littleperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |