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
TerrellKl
Novice


Joined: 30 Aug 2005
Posts: 49

PostPosted: Fri Dec 30, 2005 4:21 pm   

Tricky Pattern to match
 
I need a trigger to match all these situations
Code:

[-- --         ---] Trevayne
[41 Troll  Cav/Bbr] Poe
[50 Elder      Pri] Orim


can you help me out?
Reply with quote
Iceclaw
Apprentice


Joined: 11 Sep 2005
Posts: 124

PostPosted: Fri Dec 30, 2005 4:34 pm   
 
~[({--|%d}) ({--|%w})%s{*}~] (%w)$
Untested, but try fiddling with this.
Reply with quote
TerrellKl
Novice


Joined: 30 Aug 2005
Posts: 49

PostPosted: Fri Dec 30, 2005 5:00 pm   
 
no luck
Reply with quote
luggage
Novice


Joined: 20 Jul 2004
Posts: 38
Location: Australia

PostPosted: Fri Dec 30, 2005 5:36 pm   
 
#REGEX {[(--|\d+)\s(--\s+|\a+)\s\s(\s\s\s|\a+).(---|\a+)]\s(\w+)} {#show matched}

Try that. It worked on my system. Guessing from the above it
returns the level? race? class1 class2 playername.

Luggage

--
Regex winning out again!
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Fri Dec 30, 2005 6:21 pm   
 
Iceclaw wrote:
~[({--|%d}) ({--|%w})%s{*}~] (%w)$
Untested, but try fiddling with this.


Should be

#TR {~[({--|%d}) ({--|%w})%s(*)~] (%w)} {}

and you have to enable "Wildcards in {} triggers" in Preferences.
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 30, 2005 6:43 pm   
 
Fixed width patterns


#TRIGGER {(^~[(&2) (&6) (&3)?(&3)~] (%w)} {
level=%int(%1)
race=%trim("%2")
class1=%trim("%3")
class2=%trim("%4")
name="%5"
}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
TerrellKl
Novice


Joined: 30 Aug 2005
Posts: 49

PostPosted: Fri Dec 30, 2005 10:50 pm   
 
Thank you very much I got it working
and I am not using it for whatever the heck you people think I am using it for
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