[Geomoose-users] Search syntax

Brent Fraser bfraser at geoanalytic.com
Tue Jul 14 12:54:27 EDT 2009


Have a look at Mapserver's Expression doc 
(http://mapserver.org/mapfile/expressions.html).  Your example of "W31-12" has a 
dash in it, and that may be causing Mapserver's Regular Expression parser to 
give unexpected results.

If you want to look for an exact match, try using String Comparison instead of 
Regular Expressions:

   FILTER '%id%'

Brent


t faustino wrote:
> Brent,
> 
> Thanks for assistance. This is snippet of itemquirey.mapfile;
> 
> LAYER # Parcels Polygon Layer
> 	    NAME 'Parcels'
> 	    DATA 'landrecords/parcels2.shp'
> 	    STATUS DEFAULT
> 	    TYPE POLYGON
> 	    METADATA
> 	    	qstring_validation_pattern '.'
> 	    END
> 	    TEMPLATE 'landrecords/itemquery_parcels.html'
> 	    FILTERITEM 'PIN'
> 	    FILTER '/^%id%/'  #begins with search regular expression
>   END
> 
> On Tue, Jul 14, 2009 at 11:32 AM, Brent Fraser<bfraser at geoanalytic.com> wrote:
>> Antonio,
>>
>>  What does the FILTER object look like in your map file?
>>
>> Brent
>>
>> t faustino wrote:
>>> Hi folks,
>>>
>>> I have my search functions for parcel working with one slight issue;
>>>
>>> Seems the syntax is not allowing for alphabetical characters in the
>>> PIN search field. I have some parcel info in alpha-numeric characters.
>>> Example W31-12.  Searches on just numeric parcels work fine.
>>>
>>> Can someone advise on the syntax to allow alpha-numeric?
>>>
>>> Best regards
>>> Antonio
>>>
> 
> 
> 




More information about the Geomoose-users mailing list