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
fcarullo
Newbie


Joined: 22 Feb 2004
Posts: 1

PostPosted: Sun Mar 07, 2004 10:36 pm   

Trigger help needed
 
Having trouble accomplishing this this is the line of text from the mud I am dealing with:
....-Stag....12 points....-Doe.......8 points
that is one case this is another:
....-Boar....7 points.....-Pheasant..5 points
(NOTE: periods are used here to represent whitespace that this message buffer seems to suppress for some reason)
My objective is to capture both the animal name and the point value which should seem straightforward. The best I can do so far is something like this for the pattern to match:
*-(%w)*(%d) point*-(%w)*(%d) point*
This doesn't work in the first case because it records 2 instead of 12. I need a trigger that will work if the number of points is either single or double digit or more for that matter. I know there must be a simple way to do it can you help?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Mar 07, 2004 11:32 pm   
 
Use %s for whitespace in your pattern.
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Sun Mar 07, 2004 11:33 pm   
 
Try this pattern: %s-(%w)%s(%d) point{|s} %s-(%w)%s(%d) point{|s}
%s is the pattern for whitespace.
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