
On Tue, Mar 13, 2012 at 11:37:02AM -0500, Robert Dailey wrote:
My regex is as follows: sregex re = "Content-Disposition:" >> +_s >> (s1=!"inline;") >> -*_ >> "size=" >> (s2=+_d) >> ';' ;
This seems to be the part causing the compiler errors: (s1=!"inline;")
When I change it to this: !(s1="inline;")
Negating a string literal coerces it to a false boolean. The underlying language is still C++ with all its rules, no matter how cute you try to make the DSL you glue on top.
It compiles just fine. I'm on VS2008 SP1.
Anyone know why the former usage does not work? I still want the group to capture an empty string if the string "inline;" does not match, which is why I put the ! inside the capture group. Does this matter?
-- Lars Viklund | zao@acc.umu.se