Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-08-19 06:51:32


> Hrm. Makes sense. However, I just thought of something. There were
> two expressions like that, and while the first one had trouble, the
> second one didn't. That is, I didn't have to group the " on the
> second expression.

The second one was at the end of the expression - if it had matched the zero
width alternative then the overall match would have been shorter.

Here's another alternative expression that I think does what you want:

  const char* badPatternStr = "<input[^>]*name=\"?([^>
\"]*)\"?[[:space:]][^>]*value=\"?([^> \"]+)";

Note the extra \"?[[:space:]] after the matched text - I think that will
work, there does have to be one or more spaces between attributes doesn't
there?

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net