A simple replacement for .* is often something like [^}]*, that is, any characters except the closing one. However, this won't match nested brackets or other more complicated cases. For this, there are modules like Regexp::Common::balanced or perhaps Text::Balanced.
In reply to Re: Pattern Match
by haukex
in thread Pattern Match
by Nansh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |