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.
In reply to Re: Matching and replacing the minimum string from the tail of the regex
by Joost
in thread Matching and replacing the minimum string from the tail of the regex
by abitkin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |