|
fcarullo Newbie
Joined: 22 Feb 2004 Posts: 1
|
Posted: 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? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Mar 07, 2004 11:32 pm |
Use %s for whitespace in your pattern.
|
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: 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. |
|
|
|
|
|