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
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Wed Aug 11, 2004 12:57 am   

%match help
 
What do i need to do to get this to work?
I want to match with the %match function: H:2668 M:2720 E:12240 W:13200 [eb]

#say %match( "H:2668 M:2720 E:12240 W:13200 [eb]", "H:%d M:%d E:%d W:%d ~[eb]")

output: 0

#say %match( "%quote("H:2668 M:2720 E:12240 W:13200 [eb]")", "H:%d M:%d E:%d W:%d ~[eb]")

output: 0 Confused
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Aug 11, 2004 3:53 am   
 
#SAY %match( H:2668 M:2720 E:12240 W:13200 [eb], H:%d M:%d E:%d W:%d ~[eb~])
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Wed Aug 11, 2004 11:55 am   
 
thanks LightBulb...I thought it was like %regex
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Wed Aug 11, 2004 1:14 pm   
 
ok so i tried to modify it a bit and it gave me a zero
#SAY %match( H:2668 M:2720 E:12240 W:13200 [eb], H:%d M:%d E:%d W:%d ~[*~]) <-- want a wild card in there...
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Thu Aug 12, 2004 5:38 am   
 
I think I remember reading somewhere that the * wildcard also matches the following space too. If it is grabbing the end brace would that be throwing off the pattern? If the letters between the braces [] don't have any spaces you could try %w. Did you play with the pattern match checker in the Editor Window?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Aug 13, 2004 4:31 pm   
 
Why don't you just use your pattern as a trigger pattern? That will save you all the headaches of trying to make it work %match.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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