|
Boost Users : |
From: Darin Adler (darin_at_[hidden])
Date: 2002-01-17 13:57:48
On 1/16/02 9:17 PM, "soleani" <soleani_at_[hidden]> wrote:
> Here's the thing, I have a file with the following:
>
> KEY1 = ${short_localhost}
> KEY2 = bbbf<control2.cfg:OTHER_SECTION:${long_localhost}>aaaf:<he
>
> I need to extract the value between the {} when it starts with a $.
> My expression works ok for KEY1 (the value part, the string to the
> right of the equal sign), however it doesn't match for the value
> for KEY2.
Right. That's because regex_match return true only if the regular expression
matches your entire string.
If you want to search for a regular expression in a string, you want
regex_search.
-- Darin
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