Hi, 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.
e.g. In the example below, I would like to capture text between tokena and tokenb. So it should capture name1 and name2. $str = "tokena name: name1 tokenb tokena name: name2 tokenb"; $str =~ m/tokena(.*)tokenb/ms; print $1; When I run this program, I get name: name1 tokenb tokena name: name2 Any suggestions? Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/