in reply to Matching and replacing the minimum string from the tail of the regex
because you're replacing / removing until the regex doesn't match.perl test.pl s foo e f s adflkja
And /s.*?e p/ obviously doesn't match "s\nfoo\ne f" but other than that it's not too clear to me what you want to accomplish exactly.
|
|---|