in reply to s/// ignoring subexpressions with variable replacement patterns
$newpat = '_$1_';
That needs to be in double-quotes, or it gets interpreted literally.
That's the problem with the sample code, at least. It sounds like your production code might be different, since you mention the patterns are user-supplied. Do you have a sample of that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: s/// ignoring subexpressions with variable replacement patterns
by Anonymous Monk on Oct 04, 2002 at 15:19 UTC | |
|
Re: Re: s/// ignoring subexpressions with variable replacement patterns
by thelenm (Vicar) on Oct 04, 2002 at 15:22 UTC |