--- Casey West <[EMAIL PROTECTED]> wrote:
> On Wed, May 02, 2001 at 03:12:23PM -0500, J. Patrick Lanigan wrote:
> : Thanks to Paul and Mike for the quick response.
> : 
> : Now, does anyone know how I can trim out the unwanted charecters
> from the
> : output of a man page so that I can display it in a browser?
> 
> Well, you could use the man2html utility, it doesn't seem like anyone
> is interested in tackling the job of converting Man to 'X' on CPAN.
> You might get away with stripping out just the text by doing:
> 
>   man ls | perl -pe's#(.)(\cH\1)|_\cH(.)#$1||$3#ge'

Couldn't you just delete all characters followed by a backspace?

    man ls | perl -pe 's/(?:.\cH)//g'

perl -p meaning print each line after processing it, -e meaning do this
expression first; the pattern being "substitute any character followed
by a backspace with nothing, globally".




__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to