|
Boost Users : |
Subject: Re: [Boost-users] Getting Original Regular Expression Out From sregex (Boost Xpressive)
From: Eric Niebler (eric_at_[hidden])
Date: 2010-01-20 23:13:02
On 1/21/2010 2:15 PM, Yan Cheng Cheok wrote:
> I have the following code.
>
> sregex rex = sregex::compile( "(\\w+) (\\w+)!" );
>
> How I can get "(\w+) (\w+)!" out from rex?
You can't. If that's important, you should use std::pair<sregex,
std::string> and store both the regex and the string used to initialize it.
HTH,
-- Eric Niebler BoostPro Computing http://www.boostpro.com
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