[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] sed question: matching ASCII escape
- Subject: [ale] sed question: matching ASCII escape
- From: danscox at mindspring.com (Danny Cox)
- Date: 31 Mar 2003 12:05:08 -0500
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