[ka-Map-users] Problem in precache2
David Badke
dbadke at uvic.ca
Wed May 17 13:52:19 EDT 2006
The "-m mapname" option in precache2 does not work if the map name
includes a hyphen (e.g. my-map) or (I suspect) any character other then
a-z, A-Z, 0-9 and _. ka-Map itself does not object to map names with
hyphens or other non-alphanumeric characters.
The problem is in the regular expression in the statement
if(preg_match('/\s-m\s+(\w+)\s/', $argString, $matches) == 1) {
The (\w)+ term only matches "word" characters, which are not clearly
defined, but don't seem to include the hyphen. Of course hyphens can be
accepted with
'/\s-m\s+([\w\-]+)\s/'
but that only covers the one case. I am far from being a regex-pert so I
can't suggest a better way...
David
--
David Badke
Humanities Computing and Media Center
University of Victoria, BC, Canada
More information about the ka-Map-users
mailing list