Think about Loose Coupling | |
PerlMonks |
Re: Matching and replacing the minimum string from the tail of the regexby hv (Prior) |
on Aug 11, 2007 at 21:34 UTC ( [id://631977]=note: print w/replies, xml ) | Need Help?? |
I'm not sure if there is a better way, but to me the obvious approach is to accept 'start' followed by '(not start)*' followed by 'end':
Note that this does more work than the original failing substitution, so you can expect it to be slower. I'm assuming that the start of a test is "an 's' followed by a newline", and on that assumption being a bit stricter than your original example about matching that. Hope this helps, Hugo
In Section
Seekers of Perl Wisdom
|
|