The previous examples either ignore greedy matching or attempt to to emulate it. I believe this is what you're looking for:
$text =~ s/#(\w+?)#/$hash{$1}/g;
--In reply to Re: regex substitution
by Anonymous Monk
in thread regex substitution
by michellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |