[Israel.pm] (no subject)
Yosef Meller
mellerf at netvision.net.il
Sun Aug 1 13:39:02 PDT 2004
Shlomo Yona wrote:
> $str='346kjfh sdf -=-23 we >skjfh87jkfh4389 jkhwe8987<';
> ($wanted_text) = $str=~/>(.*?)</;
>
> That was for non-greedy matches. If you want greedy matches:
>
> ($wanted_text) = $str=~/>(.*)</;
Ooopsy... didn't you mean:
($wanted_text) = $str=~/>([^<]*)</;
(The [^<]* will eat everything up to the closing charachter).
--
"No, I do not contain myself,"
were the final words from the set of self-excluding sets. :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://perl.org.il/pipermail/perl/attachments/20040801/72645a0e/attachment.pgp
More information about the Perl
mailing list