|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Sep 10, 2010 4:27 pm
regex issue |
Code: |
([\w '-,]+) glows with a holy aura
|
Does not match
Quote: |
a thin, plated bracer lined in gold
|
No idea why, this seems odd to me since it has matched before. This is in the beta version, but right now I'm assuming it's something I'm doing rather than a bug. Not sure what I'm missing though. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Sep 10, 2010 4:44 pm |
Assuming the text you want to match is actually
Code: |
a thin, plated bracer lined in gold glows with a holy aura |
Then your trigger should work just fine. I would check the trigger pattern and text for any trailing and leading spaces, as well as make sure it is set to be a RegEx trigger. |
|
_________________ Asati di tempari! |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Sep 10, 2010 5:14 pm |
leading and trailing spaces won't matter until he's anchoring the trigger.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Sep 10, 2010 5:15 pm |
Yes, sorry, the whole thing is "a thin, plated bracer lined in gold glows with a holy aura", I should double check my posts.
I checked for all the normal things, trailing and leading spaces, and made sure regex is checked off. I'll play around and see if I can figure out what might be the cause of the bug and post it in the beta section. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Sep 10, 2010 5:30 pm |
One problem I see is that the hyphen is not the first or last character in the square brackets. Are you trying to match the literal hyphen? If it is not first or last, the hyphen is treated as indicating a range, rather than a literal hyphen. However, I don't see why that would fail to match your text, since you don't have any hyphens in the text.
Leading and trailing spaces in the pattern _will_ matter if there are no leading or trailing spaces in the mud text. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Sep 10, 2010 5:43 pm |
Which is why I checked for them, and they aren't there :P
So I should always escape my hyphens?
edit: It was definitely the hyphen, thanks for catching that. |
|
|
|
|
|