go ahead... be a heretic | |
PerlMonks |
Re^3: Problem with alternating regex?by Athanasius (Archbishop) |
on Sep 11, 2012 at 03:19 UTC ( [id://992910]=note: print w/replies, xml ) | Need Help?? |
Greediness is not an issue for the OP because using a character class ([^"]*) constrains the match in any case. Good point. The double quote pairing is in fact correct
So, try again (with thanks to Anonymous Monk, below):
Hope that actually does help! Update 2:Your simplification is at the cost of matching almost anything. Well, that’s a bit of an overstatement. Here is the OP’s original requirement: Basically I want to match the first value found between double quotes although there are two different formats for the lines. My first solution does match “the first value found between double quotes.” But, as you point out, it doesn’t take account of the 2 specific formats. My second solution will match only on one or other of these formats. Athanasius <°(((>< contra mundum
In Section
Seekers of Perl Wisdom
|
|