Try this
use Regexp::Common; use Regexp::Common::balanced; $str=~s#\\caption($RE{balanced}{-begin=>"{"}{-end=>"}"}{-keep})#<capti +on>$1</caption>#sgi;
Vivid
In reply to Re: Matching delimiters
by vivid
in thread Matching delimiters
by pop18
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |