in reply to Bug in script, regex help req extreme urgent
Use a look-behind assertion. Rather than looking for the string 'module ' then testing if the $ARGV[2] string follows, look for the $ARGV[2] string and see if it is preceded by the string 'module '.
my $match = "(?<=module )$ARGV[2]"Using Look-ahead and Look-behind
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bug in script, regex help req extreme urgent
by sid.verycool (Novice) on Mar 09, 2013 at 13:43 UTC | |
by sid.verycool (Novice) on Mar 19, 2013 at 10:21 UTC | |
|
Re^2: Bug in script, regex help req extreme urgent
by sid.verycool (Novice) on Mar 09, 2013 at 12:57 UTC |