View unanswered posts | View active topics It is currently Wed May 01, 2024 4:48 pm



Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
 ANSI Control Characters 
Author Message
1st Sergeant

Joined: Wed Jan 23, 2002 3:00 am
Posts: 33
Unread post 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
Profile ICQ WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2559
Location: Oklahoma City, OK 73170 US
Unread post 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
Profile ICQ YIM WWW
1st Sergeant

Joined: Wed Jan 23, 2002 3:00 am
Posts: 33
Unread post 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
Profile ICQ WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post 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
Profile WWW
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post 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
Profile
1st Sergeant

Joined: Wed Jan 23, 2002 3:00 am
Posts: 33
Unread post 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
Profile ICQ WWW
Ensign
User avatar

Joined: Mon Dec 26, 2011 8:41 am
Posts: 206
Unread post 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
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 22 posts ]  Go to page Previous  1, 2

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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.