[ale] sed question: matching ASCII escape

Danny Cox danscox at mindspring.com
Mon Mar 31 12:05:08 EST 2003


Kevin,

On Sun, 2003-03-30 at 23:53, Kevin Krumwiede wrote:
> I am trying to remove ANSI X3.64 escape sequences from a BBS game log
> file.  This regex matches the escape commands:
> 
> \[[0-9;]*[a-zA-Z]
> 
> ...except for the ASCII 'ESC' that precedes a command.  I have tried
> prepending \e, \033, and \x1b, but for some reason that doesn't match
> the escape characters.

	Sed is kinda stupid when it comes to chars.  It wants a literal ESC
char.  In vi, try cntl-V-ESC to embed an ESC char.

	HTH!

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list