nvivek has asked for the wisdom of the Perl Monks concerning the following question:
My input string is as follows: 1welcometo india. Why it isn't getting matched? But,it gets matched when I used .* instead of "to india" after (?=welcome) in the pattern.if($str=~/([0-9]+)(?=welcome)to india/) { print "Matched\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Look Ahead:
by BrowserUk (Patriarch) on Apr 02, 2010 at 09:38 UTC | |
by nvivek (Vicar) on Apr 02, 2010 at 11:20 UTC | |
|
Re: Look Ahead:
by rmflow (Beadle) on Apr 02, 2010 at 08:39 UTC | |
by nvivek (Vicar) on Apr 02, 2010 at 09:14 UTC | |
by rmflow (Beadle) on Apr 02, 2010 at 12:42 UTC | |
|
Re: Look Ahead:
by Anonymous Monk on Apr 02, 2010 at 08:52 UTC |