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: Sun May 04, 2008 12:05 am   

Pattern Matching Issue
 
I've been getting better at it, I swear!

But...
Code:

#regex Ship_Color {^(?:The |the )?(Marid|Drochnathair|Plague|Chimera|Cutlass|Constellation|Nomad|Silver Bass|Black Crane|Golden Koi), (?:is docked|is anchored|is sailing)?(?: nearby to the| not far| here)?(?: to the)? (south|north|east|west|northwest|southwest|northeast|northeast)(?: sailing(?: to the)? (south|north|east|west|northwest|southwest|northeast|northeast))?\.$} {#COL #00FF00}


refuses to match:

The Silver Bass, nearby to the north sailing northwest.

There's a couple other failed patterns, I think it's the same issue though.
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Sun May 04, 2008 12:35 am   
 
You've got two spaces, one directly after the comma and one in " nearby to the". You should probably also take out "to the" from " nearby to the", because isn't that supposed to be in the next (?:) ?
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Sun May 04, 2008 4:20 am   
 
Yup, thanks
_________________
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