[mapserver-users] Problems when using complex expressions
Andreas Albarello
andreas.albarello at territoriumonline.com
Tue Jul 21 02:21:09 PDT 2009
Adrian Popa wrote:
> EXPRESSION (/MYREGEXP/i) -> doesn't work (doesn't match anything)
> EXPRESSION /MYREGEXP/i -> works
> EXPRESSION "[myColumn]" ==1 -> doesn't work (loadClass(): Unknown
> identifier. Parsing error near (=))
> EXPRESSION ("[myColumn]" ==1) -> doesn't work (doesn't match anything)
> EXPRESSION ("[myColumn]" eq "1") -> works
>
> EXPRESSION (/MYREGEXP/i) && ("[myColumn]" eq "1") -> doesn't work
> (doesn't match anything)
> EXPRESSION /MYREGEXP/i && ("[myColumn]" eq "1") -> doesn't work
> (loadClass(): Unknown identifier. Parsing error near (&))
> EXPRESSION ((/MYREGEXP/i) && ("[myColumn]" eq "1")) -> doesn't work
> (doesn't match anything)
>
> I have checked my data and it should match - most likely, my expression
> is wrong. Any suggestions? What is the correct syntax for mixing regular
> expressions with other values?
Adrian,
have a look at this: http://mapserver.org/mapfile/expressions.html
As far as mixing regular and other expressions goes, this is the correct
way to do it:
EXPRESSION (("[myColumn]" =~ /MYREGEXP/i) && ("[myColumn]" eq "1"))
Best regards,
--
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development
Territorium Online srl/GmbH
Via Buozzi Str. 12
I 39100 Bolzano/Bozen
Phone: +39 0471 068611
Fax: +39 0471 068619
email: andreas.albarello at territoriumonline.com
web: http://www.territoriumonline.com
--------------------------------------------------------------------
More information about the MapServer-users
mailing list