Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
roffman
Newbie


Joined: 23 Feb 2008
Posts: 2

PostPosted: Sat Feb 23, 2008 1:33 am   

Matching variables problem
 
I was just wondering if you can add variables to the pattern for a trigger.

Also, is it possible to detect carriage return and new line ascii characters (10 and 13) for trigger activation
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Sat Feb 23, 2008 2:23 am   
 
Yes, you can even match stringlists inside variables in the same way you would match a stringlist

I was given this website for #REGEX, you can expand ascii using the %char() function but from your question I expect you will want a higher degree of control

http://www.regular-expressions.info/

edit: oh newlines and carriage return are coded in predefined variables

these seem to be those:

Code:
%cr   a carrige return character
%crlf   a carrige return and a linefeed character, together they are called newline
%lf   a linefeed character


help/contents/reference/predefined variables
Reply with quote
roffman
Newbie


Joined: 23 Feb 2008
Posts: 2

PostPosted: Sun Feb 24, 2008 5:50 am   
 
thanks for that, exactly what i needed.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net