Featured post
c++ - How to get string with pattern from std::regex in VC++ 2010 -
can string regular expression std::regex? or should save somewhere else if want use later?
in boost can this:
boost::regex reg("pattern"); string p = reg.str(); or use << operator
cout << reg; print pattern.
but in std::regex there no str() or operator<<. should save string somewhere else or can't find it?
in debugger can see what's in std::regex.
i looked in n3225, section 28.4 (header <regex> synopsis) , indeed, basic_regex template has no member function str, , there no operator<< provided.
the paragraph 28.8/2 provides a little insight on :
objects of type specialization of
basic_regexresponsible converting sequence ofchartobjects an internal representation. not specified form representation takes, nor how accessed algorithms operate on regular expressions.
what understand standard mandates basic_regex can constructed const chart * not require implementation keep string.
- Get link
- X
- Other Apps
Comments
Post a Comment