|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sat Feb 07, 2009 1:48 am
[2.37] Pattern matching query |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="12960" copy="yes">
<pattern>^[A-z,' ] {tell|snarl|say|yell|mutter|says|shout|exclaim|ask|sing|chant}*, ~"*[).'?!]~"$</pattern>
<value>#capture chanCap</value>
</trigger>
</cmud>
I'm a bit confused about why that matches lines such as:
(Web): Name says, "This is what they say."
That trigger was supposed to match only tells and in-room communication such as says. Not channels which always begin with (Chan-name):
Yet it does. Even when I rewrite the trigger in a blank session. Its anchored with ^ and my range does not include ( or ) so surely it should not match? I suspect it is related to first of the two * wildcards I've used (and I'm unsuccessfully trying to remember why I put that in). However, if that is the cause, I still don't get how:
^[A-z,' ]
Matches
(Web):
Anyone got any explanations? |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Feb 07, 2009 4:04 am |
I'm not seeing this. To test, I copied your pattern ^[A-z,' ] {tell|snarl|say|yell|mutter|says|shout|exclaim|ask|sing|chant}*, ~"*[).'?!]~"$ into the pattern of a new blank trigger, and clicked save. I then swapped to the Test Pattern tab and pasted your test line, (Web): Name says, "This is what they say." into the box and pressed test. No match. I then tried the simplified patterns ^[A-z,' ] {tell|snarl|say|yell|mutter|says|shout|exclaim|ask|sing|chant} and ^[A-z,' ] and still no match.
Try using the Test Pattern tab for your trigger. I suspect that your trigger will also fail this test, in which case you have another trigger that's matching this text, but it's similar enough that it's hard to tell the difference. If your trigger really is passing this test, then this is a very strange bug indeed. As a first port of call, I'd suggest deleting the folder you installed CMUD to (not your data files folder, so none of that should be lost) and reinstalling it.
Incidentally, because of the way you're using * and the range, this pattern's going to be doing a lot of backtracking on a successful match. You might want to look at using a regex with a lazy quantifier. |
|
|
|
|
|
|
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
|
|