[mapserver-users] CLASS EXPRESSION regex help?
Johan.Forsman at LA.GOV
Fri Jul 23 11:37:27 EDT 2010
Hi Steve, and thanks for the reply.
I was under the impression that the CLASS expression did not support SQL-type syntax, that only the FILTER expression did?
I had originally tried using
EXPRESSION "orgid NOT LIKE 'LADE%'"
and although no errors are indicated, no records are returned either.
I just tried
which does draw the other points, but I haven't yet counted the records to verify if the numbers add up or if that syntax excludes some records. As I warned, regex neophyte! I am getting the impression it's even more complicated than it looks.
However, the response from Steve Lime appears to have provided a solution that works in this instance.
Thanks for the help!
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Steve Grey
Sent: Friday, July 23, 2010 9:47 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] CLASS EXPRESSION regex help?
You are having success looking for records that match a pattern starting with 'LADE' - similar to using 'LIKE' - but are getting stuck looking for records matching a pattern that doesn't start with 'LADE'.
Try an approach along the lines of NOT LIKE.
On 23 July 2010 15:20, Johan Forsman <Johan.Forsman at la.gov<mailto:Johan.Forsman at la.gov>> wrote:
Regex neophyte, using MS 5.4.2 in FGS on Ubuntu Server 9.10, I wish to render two classes based on content in a PostGIS field.
For the first CLASS I want all records that start with "LADE", and using
appears to return the expected records.
However, for the second CLASS I want all records that DO NOT start with "LADE", but using
does not return any records and the log contains
msEvalExpression() error: Regular expression error. Invalid regular expression.
Examples out in the ether all indicate that this "negative lookahead" is supposed to do exactly what I want.
What am I doing wrong in this instance?
Safe Drinking Water Program
Louisiana Department of Health and Hospitals
Office of Public Health
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-users