A better way?
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Sun Aug 22 17:06:45 PDT 2004
Hi Andy,
Have you tried:
EXPRESSION /^TAP2$/
on linux read "man regex" for more ideas. The '^' match beginning of
line, and '$' says match end of line, where line in this case means
field or string being matched against. So this should not match "TAP2EQ"
-Steve Woodbridge
ANDY CANFIELD wrote:
> Currently I need to display everything from a layer where a field has
> "TAP2"
> in it but not "TAP2EQ".
>
> How I get around it is i have one class with no symbol in the layer which
> comes first and does this:
> "EXPRESSION /EQ/" so it gets everything with "EQ" in it which I never want
> displayed. Then my next class in the layer has a symbol and it's expression
> is:
> "EXPRESSION /TAP2/"
> This works fine but I'd rather not have to filter this way as it's relying
> on something in Mapserver which may or may not always work this way in the
> future. Is there a negation operator for within a regular expression like
> "EXPRESSION /TAP2[!EQ]/" ?
>
> I don't know enough about regular expressions to know if there is some
> obscure negation operator. I know the standard ones but since usually you
> can do the negation outside of the expression like "if($foo !~ /EQ/){
>
> }"
> but because it's inside the map file I have no idea what to use inside a
> regex for negation of characters?
> Any ideas?
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
More information about the MapServer-users
mailing list