Actually EXPRESSIONs can handle regex too: CLASSITEM ‘tag’ CLASS EXPRESSION /^TVOP2/ … END
This catches all tag’s that begin with the pattern TVOP2. You might want to do a FILTER instead if this is the ONLY filter you need to apply. You’d see a small performance boost if that were the case. Steve From: [email protected] [mailto:[email protected]] On Behalf Of tommaso Sent: Tuesday, November 09, 2010 5:29 AM To: wildcolour Cc: [email protected] Subject: Re: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS Hi, for regular expression you need to set the parameters FILTERITEM and FILTER. >From the documentation >(http://mapserver.org/mapfile/expressions.html#regular-expression-comparison<http://mapserver.org/mapfile/expressions.html#regular-expression-comparison)>) LAYER NAME "regexp-example" FILTERITEM "placename" FILTER /hotel/ ... END I think, the parameter EXPRESSION does not allow regular expression comparison. Cheers, Tommaso On Mon, 2010-11-08 at 15:29 -0800, wildcolour wrote: Thanks, this looks great. I will try it tonight, but I think is looking just right. One more related question. The column we are using is called 'Tag' and the seemed to have grouped the 'class' and the 'title' in the one column. For example all secondary roads have the tag "TVOP2" but roads with the name 'smith st' will look like this "TVOP2,SMITH ST" So my question is in the expression can I do a 'is like' query?? I am guessing somthing like this EXPRESSION 'TVOP2%' Thanks for the great support Matt :)
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
