[mapserver-users] CLASS EXPRESSION regex help?

Steve Grey stevegrey78 at gmail.com
Fri Jul 23 10:46:30 EDT 2010


Johan,

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.

Steve



On 23 July 2010 15:20, Johan Forsman <Johan.Forsman at la.gov> wrote:

> All:
>
> 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
>
> NAME "LADE"
> EXPRESSION /^LADE.*/
>
> appears to return the expected records.
>
> However, for the second CLASS I want all records that DO NOT start with
> "LADE", but using
>
> NAME "Other"
> EXPRESSION /^(?!LADE).*/
>
> 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?
>
> Thanks!
> /Johan.
>
> ----------------------
> Johan Forsman
> Geologist
> Safe Drinking Water Program
> Louisiana Department of Health and Hospitals
> Office of Public Health
> Telephone: 225.342.7309
> Telefax: 225.342.7303
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100723/62de4a59/attachment.html


More information about the mapserver-users mailing list