Re: s/A/B/ and s/B/C/ but don't want A -> C
- From: Ted Zlatanov <tzz@xxxxxxxxxxxx>
- Date: Fri, 28 Dec 2007 14:14:00 -0600
On Fri, 28 Dec 2007 20:47:50 +0100 Michele Dondi <bik.mido@xxxxxxxxxxxxx> wrote:
approach anyone can recommend?
MD> Well, similar to yours, except not necessarily with /e (often a hash
MD> is enough):
MD> s/([ABC])/$replacement{$1}/g;
That works too, much faster but it can only do static strings. I didn't
think of it. Thanks.
Ted
.
- Follow-Ups:
- Re: s/A/B/ and s/B/C/ but don't want A -> C
- From: Abigail
- Re: s/A/B/ and s/B/C/ but don't want A -> C
- References:
- FAQ 6.4 I put a regular expression into $/ but it didn't work. What's wrong?
- From: PerlFAQ Server
- Re: FAQ 6.4 I put a regular expression into $/ but it didn't work. What's wrong?
- From: Ben Morrow
- s/A/B/ and s/B/C/ but don't want A -> C (was: FAQ 6.4 I put a regular expression into $/ but it didn't work. What's wrong?)
- From: Ted Zlatanov
- FAQ 6.4 I put a regular expression into $/ but it didn't work. What's wrong?
- Prev by Date: Re: s/A/B/ and s/B/C/ but don't want A -> C
- Next by Date: Re: count the number of occurences of each different word of a text
- Previous by thread: Re: s/A/B/ and s/B/C/ but don't want A -> C
- Next by thread: Re: s/A/B/ and s/B/C/ but don't want A -> C
- Index(es):