Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: 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.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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