I was going through examples and questions on the web related to finding and replacing a text between two strings (say START and END) using perl. And I was successful in doing that with the provided solutions. In this case my START and END are also inclusive to replacement text. The syntax I used was s/START(.*?)END/replace_text/s to replace multiple lines between START and END but stop replacing when first occurrence of END is hit.
But I would like to know how to replace a text between START and END excluding END like this in perl only.
Before:
START
I am learning patten matching.
I am using perl.
END
After:
Successfully replaced.
END