|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Fri Feb 01, 2002 12:36 pm
Pattern Matching CR |
i have the following trigger:
#TRIGGER {^Can affect you as :$} {#SUB ""}
when it fires it leave a blank line in the output:
Wt: 4 Val: 10000 Lvl: 25
MA: 20
what i want is:
Wt: 4 Val: 10000 Lvl: 25
MA: 20
how do i match that? |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Fri Feb 01, 2002 4:02 pm |
Not quite sure what you are trying to do...Is you mud output like this?
Wt: 4 Val: 10000 Lvl: 25
Can affect you as :
MA: 20
And you are trying to get rid of the 'Can affect you as :' without a blank spot?
The pattern to match a blank line is {^$}, but if you are trying to get get rid of that part of the text, you would probably want to use #GAG instead of #SUB "". |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Feb 01, 2002 4:06 pm |
quote:
By definition of your trigger you are
leaving a blank line, no?
#TRIGGER {^Can affect you as :$} {#SUB ""}
Not in front of zMud but try:
#TRIGGER {^Can affect you as :} {#SUB ""}
and change it from a trigger responding to
a newline to prompt.
TonDiening
Uses 6.16
TonDiening
Uses 6.16 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Feb 01, 2002 6:21 pm |
When you use #SUB zMUD just replaces the matched text with what you supply (which is nothing) but it doesn't eliminate any newlines. What you want is #GAG. This command erases the last line received from the MUD.
Kjata |
|
|
|
|
|