Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I know the lookahead probably isn't strictly necessary here, but regardless, what's the deal? How do I have comments and lookaheads at the same time? Thanks!my @matches = ($_ =~ m/(<p class=g>.*?<a href=https?:\/\/)([^<]*?>)(.* +?(?=<p class=g>))/g); #works. #my @matches = ($_ =~ m/(<p class=g>.*?<a href=https?:\/\/)([^<]*?>)(. +*?(?=<p class=g>))/gx); #doesn't work. my @matches = ($_ =~ m/(<p class=g>.*?<a href=https?:\/\/)([^<]*?>)(.* +?<p class=g>)/g); #got rid of lookahead. works.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex Extended Comments with lookahead?
by JediWizard (Deacon) on Nov 10, 2004 at 19:38 UTC | |
by tphyahoo (Vicar) on Nov 10, 2004 at 19:46 UTC | |
|
Re: Regex Extended Comments with lookahead?
by Eimi Metamorphoumai (Deacon) on Nov 10, 2004 at 19:43 UTC | |
|
Re: Regex Extended Comments with lookahead?
by Anonymous Monk on Nov 10, 2004 at 19:09 UTC | |
by tphyahoo (Vicar) on Nov 10, 2004 at 19:10 UTC | |
by tphyahoo (Vicar) on Nov 10, 2004 at 19:24 UTC | |
by tphyahoo (Vicar) on Nov 10, 2004 at 19:39 UTC |