Getting Original Regular Expression Out From sregex (Boost Xpressive)
21 Jan
2010
21 Jan
'10
3:15 a.m.
I have the following code. sregex rex = sregex::compile( "(\\w+) (\\w+)!" ); How I can get "(\w+) (\w+)!" out from rex? Thanks and Regards Yan Cheng CHEOK
21 Jan
21 Jan
4:13 a.m.
New subject: Getting Original Regular Expression Out From sregex (Boost Xpressive)
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
5356
Age (days ago)
5356
Last active (days ago)
1 comments
2 participants
participants (2)
-
Eric Niebler
-
Yan Cheng Cheok