You might check the matches with
$ grep -nH --color=auto ''
and then reuse the regex in sed.
--hh
"Martin G. McCormick" wrote (Tue, 10
Jun 2014 14:01:20 -0500):
> I am trying to remove the & or ampersand sign from some perl
> code I wrote as it is not necessary. I have no trouble finding
> a
Reco writes:
> Try it like this:
>
> sed -r 's/&([a-z])/\1/g'
It worked like a charm. I forgot about the parentheses and the
\1 to limit the number of matches.
My thanks to everyone who emailed me both on and off-list.
Martin McCormick
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.d
Hi.
On Tue, 10 Jun 2014 14:01:20 -0500
"Martin G. McCormick" wrote:
> The replacement pattern should actually be the same as the
> search pattern except that it is missing the & or ampersand.
Try it like this:
sed -r 's/&([a-z])/\1/g'
Or, in vim:
s/&\([a-z]\)/\1/g
Reco
--
To UNSUBSCRIB
On Tue, 10 Jun 2014 14:01:20 -0500
"Martin G. McCormick" wrote:
> I am trying to remove the & or ampersand sign from some perl
> code I wrote as it is not necessary. I have no trouble finding
> all the instances because they consist of an ampersand
> immediately followed by a letter so &[a-z] des
I am trying to remove the & or ampersand sign from some perl
code I wrote as it is not necessary. I have no trouble finding
all the instances because they consist of an ampersand
immediately followed by a letter so &[a-z] describes the case
perfectly.
The replacement pattern should actually be the
5 matches
Mail list logo