No such thing as a small change | |
PerlMonks |
Re: Re: Re: Regex (lookahead) Confusionby ChrisR (Hermit) |
on Feb 05, 2004 at 22:01 UTC ( [id://326905]=note: print w/replies, xml ) | Need Help?? |
So let's see if I understand this and please correct me if I'm wrong. The ?: means that the parens are just for grouping and will load any matches into $1, $2, etc. Then the character class in parens and then the lookahead... ?! means that it is a negative lookahead .* means any character 0 or more times (very greedy) \1 is related to the character matched from the character class It's the .* that is throwing me off. To me, that looks like it would match a single character repeated any number of times but not separated duplicate characters. I just don't understand it ... yet. I will keep looking.
In Section
Seekers of Perl Wisdom
|
|