Re: Substitutions in matched patterns?
- From: Anton81 <forum@xxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 14:56:48 +0100
>> what is the easiest way to do substitutions in matched strings.
>> For example I want to do s/ABC/DEF/g , but only if the ABC is between
>> braces.
> s/{ABC}/{DEF}/g;
ABC is not directly between braces. It's more something like
s/({.*)ABC(.*})/\1DEF\2/g
but as it get's more complicating (more different substitutions), one needs
another solution.
Anton
.
- Follow-Ups:
- Re: Substitutions in matched patterns?
- From: it_says_BALLS_on_your forehead
- Re: Substitutions in matched patterns?
- From: it_says_BALLS_on_your forehead
- Re: Substitutions in matched patterns?
- References:
- Substitutions in matched patterns?
- From: Anton81
- Re: Substitutions in matched patterns?
- From: Bernard El-Hagin
- Substitutions in matched patterns?
- Prev by Date: Re: Substitutions in matched patterns?
- Next by Date: Re: Storing object references in hashes
- Previous by thread: Re: Substitutions in matched patterns?
- Next by thread: Re: Substitutions in matched patterns?
- Index(es):
Relevant Pages
|