|
misaochankun Beginner
Joined: 01 Feb 2003 Posts: 27 Location: USA
|
Posted: 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 |
|
|
|
billaben Wanderer
Joined: 02 Sep 2005 Posts: 60
|
Posted: 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. |
|
|
|
misaochankun Beginner
Joined: 01 Feb 2003 Posts: 27 Location: USA
|
Posted: 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. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Sep 21, 2005 7:24 pm |
If you make it a regular expression trigger, \$ should work the way ~$ does for a normal trigger.
|
|
|
|
|
|