Sharan Basappa wrote:
Gary Stainburn wrote:
On Monday 14 April 2008 16:35, Sharan Basappa wrote:
I am trying to capture the text between two tokens. These tokens
always exist in pairs but can occur N times.
I somehow dont get what I want.
$str =~ m/tokena(.*)tokenb/ms;
print $1;
Try
$str =~ m/tokena(.*?)tokenb/ms;
actually I tried this before posting this question. The issue is that
regex stops after first match.
Show us a short but _complete_ program, and we can help you correct it.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/