|
Register •
FAQ
• Search • Login
|
Author |
Message |
SupG
1st Sergeant
Joined: Wed Jan 23, 2002 3:00 am Posts: 33
|
Re: ANSI Control Characters
Oh by the way, I was able to watch the entirety of Vulcan Thunder without a single ANSI character showing up in my logs using the regex I listed above! So I think that's a good enough test, don't you?
|
Thu Apr 04, 2013 6:03 pm |
|
|
Micro
Ambassador
Joined: Wed Apr 20, 2011 1:19 pm Posts: 2559 Location: Oklahoma City, OK 73170 US
|
Re: ANSI Control Characters
That's a pretty good test. Code: \x1b\[([0-9]+(;[0-9]+)*)?\??[A-HJKSTsuflhm] Will that match a Select Graphic Rendition (SGR) with more than two parameters? i.e. ^[1;32;44m It may not happen very often, but it is valid. Also note that the letters listed are only the most common escape sequinces, and not a complete list according to http://en.wikipedia.org/wiki/ANSI_escape_code.
_________________ Regards, Micro Website: http://www.microblaster.net TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002
ICQ is Dead Jim! Join us on Discord: https://discord.gg/zvEbArscMN
|
Thu Apr 04, 2013 6:21 pm |
|
|
SupG
1st Sergeant
Joined: Wed Jan 23, 2002 3:00 am Posts: 33
|
Re: ANSI Control Characters
Yeah, I noticed that it wasn't a full list - but I think it's probably good enough for my purposes.
Oh, it should catch that code you listed, the * after the group will match that sequence zero or more times.
|
Thu Apr 04, 2013 6:57 pm |
|
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
Re: ANSI Control Characters
SupG wrote: Oh by the way, I was able to watch the entirety of Vulcan Thunder without a single ANSI character showing up in my logs using the regex I listed above! So I think that's a good enough test, don't you? The Cineplex is essential to gameplay. IIRC, I had to make some adjustments to my emulation to display the movies correctly.
_________________ Suddenly you're Busted!
|
Fri Apr 05, 2013 1:11 am |
|
|
Tweety
Boo! inc.
Joined: Fri Jan 04, 2002 3:00 am Posts: 221 Location: Canada
|
Re: ANSI Control Characters
this is like the most interesting thread here. hey supg!
I don't play anymore, but i still dabble with programming and stuff. well i played for a little bit, but now decided not to play games.
what are you working on requiring removing ansi codes?
|
Fri Apr 05, 2013 5:25 pm |
|
|
SupG
1st Sergeant
Joined: Wed Jan 23, 2002 3:00 am Posts: 33
|
Re: ANSI Control Characters
Hey Tweety, nice to see you again! Just screwin' around with a pet project of mine that I'd wanted to do for a long time. Creating a C#/SQL based proxy a la TWX. Seemed like a good idea when I started at least..
|
Sat Apr 06, 2013 1:29 am |
|
|
Astrochimp
Ensign
Joined: Mon Dec 26, 2011 8:41 am Posts: 206
|
Re: ANSI Control Characters
SupG wrote: Hey Tweety, nice to see you again! Just screwin' around with a pet project of mine that I'd wanted to do for a long time. Creating a C#/SQL based proxy a la TWX. Seemed like a good idea when I started at least.. That sounds like a good project... is this a port of twx or a new project? i.e. are you trying to support twx scripts?
|
Thu Sep 26, 2013 2:34 pm |
|
|
|
Who is online |
Users browsing this forum: No registered users and 10 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|