Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: regexp need a match characters and spacesby reasonablekeith (Deacon) |
on Mar 23, 2006 at 11:17 UTC ( [id://538712]=note: print w/replies, xml ) | Need Help?? |
This works for the OP's code, but would force the need for a trailing newline if the OP wanted to match what came after c.
If you swap the regex for the following you'll remove that requirement. Note the I've had to swap out the \s+ as this was scooping up the newline character if there was no data on the line, resulting in the regex matching the whole of the following line.
--- my name's not Keith, and I'm not reasonable.
In Section
Seekers of Perl Wisdom
|
|