in reply to Re: regex is not working as I intended
in thread regex is not working as I intended
I'm not sure why,
At position 0,
- (?<=\')(.*?)(?>\') can't possibly match (there can't be a ' before the first character),
- (?<=\")(.*?)(?>\") can't possibly match (there can't be a " before the first character), but
- (.*) always matches.
Since it matched at position 0, it doesn't try to match at position 1 (where one of the first two alternates has a chance of matching).
In Section
Seekers of Perl Wisdom