[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: suppressing special output from troff -Tascii




On Mon, 24 Nov 1997, Dale Scheetz wrote:

> Is there a way to get troff to not do these formatting steps? As an
> alternative how can I get sed or some other text manipulator to take
> the three character sequence <characterX><control-H><characterX> into
> simply <characterX>?
> 
perl -pie "s/X\cHX/X/g"

will replace X followed by C-H followed by X with X.

Better you try it on a copy first. I don't trust myself that much :-)

Maybe you want the enhanced version perl -pie "s/(\w)\cH\1/$1/g"
Will change "a word character followed by C-H followed by the privious
word" to the word character found.

A^HA will be changed to A. A^HB won't be changed.

A word character is defined as [a-zA-Z_0-9] 

Ciao,
	Martin


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . Trouble? 
e-mail to templin@bucknell.edu .


Reply to: