[mapserver-users] Problems when using complex expressions

Adrian Popa adrian_gh.popa at romtelecom.ro
Tue Jul 21 04:59:58 EDT 2009


Hello everyone,

I'm trying to filter items by using a regular expression and a 
string/number comparison. Here's what works, and what doesnt:

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?

Thanks,
Adrian



More information about the mapserver-users mailing list