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
misaochankun
Beginner


Joined: 01 Feb 2003
Posts: 27
Location: USA

PostPosted: Wed Sep 21, 2005 3:46 pm   

Answered: Capture trigger - How to grab [$]
 
I have tried what I could figure out to capture this: [$]
But when I use it, it captures ALL text from the MU*.
I have tried using \ as a delimiter, but that does not seem to work.
I have tried putting it inside of quotes: "[$]" and it does not work.
I tried disabling the use of [] in the preferences as well.
What am I doing wrong?


Last edited by misaochankun on Wed Sep 21, 2005 4:49 pm; edited 2 times in total
Reply with quote
billaben
Wanderer


Joined: 02 Sep 2005
Posts: 60

PostPosted: Wed Sep 21, 2005 4:39 pm   
 
The problem with $ is that it is a special character. When seen in a trigger command it means <EOL>. So it will try to match your pattern ending at the $ as the end of a line.

If your $ is in a specific place you can capture it easily with ~$

the ~ character is used to force trigger to use a character literally.

Another angle would be to substitute them out for something that isn't a special character. Unfortunatelly with zMud most every symbol is a special character of some kind or another.

#TRIGGER {~$} {#SUB {-}}

That would arbitrarily replace all dollar signs with a dash.
Reply with quote
misaochankun
Beginner


Joined: 01 Feb 2003
Posts: 27
Location: USA

PostPosted: Wed Sep 21, 2005 4:48 pm   
 
The ~ did work well. I'll have to remeber that.
I could have sworn I used \ as the delimiter before.
Thanks.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Sep 21, 2005 7:24 pm   
 
If you make it a regular expression trigger, \$ should work the way ~$ does for a normal trigger.
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