|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: 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. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: 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 (?:) ?
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sun May 04, 2008 4:20 am |
Yup, thanks
|
|
|
|
|
|