Opened 22 years ago

Closed 21 years ago

#198 closed defect (fixed)

Expression containing "/" (slash) don't work.

Reported by: sfournier@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 3.6
Severity: major Keywords:
Cc:

Description

Well, it depends. If I have an expression like this:
(STR1|STR2|N\/A)   <== Last value mean "N/A"

This works fine. But if I use the "/":
/STR1|STR2|N\/A/

This one crash. I already take a look at maplexer.l to see if I can figure out
what is going on, without success. But by changing:

<INITIAL,VALUE_STRING>\/[^\/]*\/   ....
by
<INITIAL,VALUE_STRING>\/.*\/   ....

... it fixed my problem. But since I really not sure of the impact of that
change, I'll not commit it. Any ideals ?

Change History (3)

comment:1 by sdlime, 22 years ago

I'm not sure your fix actually fixes the problem. I added a program called
testexpr to the 3.7 source to test logical expressions. For example:

./testexpr "'n/a' =~ /a$/"
Expression evalulated to: 1.

works fine. But:

./testexpr "'n/a' =~ /n\/a/"
Error parsing expression.

gives a parse error regardless of that change. I'm testing with logical
expressions as opposed to a pure regex like you did, but in theory they are
using the exact same mechanism. I need to do more checking...

Steve

comment:2 by sfournier@…, 22 years ago

Oh. I did'nt commited my changes yet. I'll do it right now. :)

comment:3 by dmorissette, 21 years ago

Resolution: fixed
Status: newclosed
I assume this is fixed since I cannot reproduce the error.
Note: See TracTickets for help on using tickets.