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
Private
Adept


Joined: 10 Jan 2002
Posts: 264
Location: USA

PostPosted: 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?
Reply with quote
dacheeba
Adept


Joined: 29 Oct 2001
Posts: 250

PostPosted: 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 "".
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: 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
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
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