case insensitive query
Eduardo Spremolla
edspremolla at ANTEL.COM.UY
Wed Sep 22 10:07:51 PDT 2004
I can't find a way to do it with mapserver regex.
I use a javascript function to change the regex into :
/^[uU][sS][eE] ......
<form method="GET" id="qrbs" action="/cgi-bin/mapserv" >
<input type="hidden" name="map" id="map" value="/var/your.map">
<input type="hidden" id="ext" name="imgext" value="-59.309104 -35.041596 -52.637104 -30.035868">
<input type="hidden" name="imgxy" value="279.5 209.5">
<input type="hidden" name="mode" value="itemnquery">
<input type="hidden" name="qlayer" value="rbs">
<input type="hidden" name="map_rbs_filteritem" value="sitename">
<input type="hidden" id="rbs_name2" name="map_rbs_filter" value="">
Busqueda por radiobase <input type="text" id="rbs_name" value="">
<input type="submit" name="Buscar" onClick="reparo();">
</form>
function reparo(){
t=document.getElementById("rbs_name");
str=new String(t.value);
stri=new String("/");
for (i=0;i<str.length;i++)
{
stri=stri.concat("["+str.charAt(i).toLowerCase()+str.charAt(i).toUpperCase()+"]");
}
document.getElementById("rbs_name2").value=stri+"/";
document.getElementById("qrbs").target="_blank";
}
LALO
El mar, 21-09-2004 a las 06:50, Peter Drake escribió:
> I need help understanding how to make a qstring expression case
> insensitive. Specifically, I am using this query:
>
> qstring=('[NAME]'=~/^userenteredtext.*/)
>
> and I would like the user entered text to be matched case insensitive.
> Also, is there any way to specify the field to search (eg. [NAME])
> with a wildcard so that more than one field is searched or do I simply
> need to build my qstring to test all of the fields (test each field
> individually)?
>
> Thanks for any help!
> Peter
--
Eduardo Spremolla <edspremolla at antel.com.uy>
Antel I+D
More information about the MapServer-users
mailing list