in reply to regex substitution
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;
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: regex substitution
by chromatic (Archbishop) on Nov 06, 2001 at 06:28 UTC |