Here is one way to do it.
Updated: included '\n' before =end.$string =' some another lines =begin some lines some lines =end some another lines...'; while ($string =~ /(?:(?:^|\n)=begin)((?:(?!\n=end).)*)\n=end/gs){ print "$1\n"; } output: ======= some lines some lines
Prasad
In reply to Re: Regular expression...
by prasadbabu
in thread Regular expression...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |