[Mapserver-users] MapScript PHP regular expressions: case in-sensitive, MS 3.7

Armin Burger armin.burger at libero.it
Sun Feb 16 16:18:53 EST 2003


Hi everybody,

I have a question with regard to regular expressions in MapScript PHP:

I want to do an attribute search with regex that is *case in-sensitive*.
For example searching the field 'NAME' for the value 'pippo':

The only method that worked for me was the following

$qStr = ('[NAME]' =~ /(P|p)(I|i)(P|p)(P|p)(O|o)/)
$qLayer->setFilter($qStr);
@$qLayer->queryByAttributes(MS_MULTIPLE);

Is there a more simpler regular expression to achieve this?

The perl syntax
 ... =~ /pippo/i
did not work.

Is there an overview about the regular expression syntax that can be used
in conjunction with mapserver? For the test I used the Win binary 3.6.4
from DM Solutions.


The search expression above did not work with MS version 3.7. Is that due
to changes of the filter functions that can now not be used any longer
for queries? There is the extended method 'queryByAttributes' but that
seems to be limited to one single item. What if I want to apply a search
on two fields?

Thanks in advance for any hints.

Armin Burger





More information about the mapserver-users mailing list