I'd suggest you to ask on the Mapserver mailing list how to correctly escape a slash in regex expressions for MS attribute search. The normal way of doing this in Posix regex using '\/' seems not to work.
armin On 13/09/2009 18:23, Siki Zoltan wrote: > Dear Armini and List, > > Thank you for the quick replay Armin. > > I've tried to replace "/" with "\/", but it returns no result too: > > [qStr] => ( "[HRSZ]" =~ /^(2|2)(2|2)(4|4)(8|8)(6|6)(9|9)\/(2|2)$/) > > I tried it with CGI mapserver too, but I failed to escape / characters > in qstring. I found no general solution :( > /224869\/2/ doesn't work neither with CGI mapserver nor with pmapper > /224869[\/]2/ doesn't work neither with CGI mapserver nor with pmapper > CGI Mapserver returns regexp error: > Invalid regular expression. msEvalExpression(): Regular expression error. > > The only "reasonable" solution I found: > /224869[^0-9a-zA-Z]2/ to have there any special char. > > May it be a Mapserver issue? > > Regards, > Zoltan > > On Sun, 13 Sep 2009, Armin Burger wrote: > >> Try to replace line 230 in >> in query/search.php (function getSearchParamsShp()) >> with the following >> >> if ($wildcard != 2) { >> $qval = str_replace("/", "\\/", preg_quote($val)); >> $val = preg_replace ("/\w/ie", "'('. strtoupper('$0') . '|' . >> strtolower('$0') .')'", $qval); >> } >> >> and see if it helps. It also escapes other special characters that >> could cause problems with regex. Suggest functions might also not work >> with such strings, that I had to check. >> >> Armin >> > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users