diff --git a/demo/regress/regex_test.cpp b/demo/regress/regex_test.cpp index d93594e0..333962b8 100644 --- a/demo/regress/regex_test.cpp +++ b/demo/regress/regex_test.cpp @@ -54,7 +54,7 @@ regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbas | regbase::bk_parens | regbase::bk_refs | regbase::bk_vbar | regbase::use_except | regbase::failbit | regbase::literal | regbase::icase | regbase::nocollate | regbase::basic | regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed; -#if 0 + template class reg_expression; template class sub_match; template class match_results; @@ -163,7 +163,6 @@ template test_string_type regex_merge(const test_string_type&, unsigned int flags); #endif -#endif } // namespace boost @@ -199,3 +198,4 @@ template test_string_type regex_merge(const test_string_type&, #include "libs/regex/src/regex_synch.cpp" #include "libs/regex/src/wide_posix_api.cpp" + diff --git a/demo/snippets/snip10.cpp b/demo/snippets/snip10.cpp index de196f2a..0cf430b5 100644 --- a/demo/snippets/snip10.cpp +++ b/demo/snippets/snip10.cpp @@ -5,7 +5,7 @@ bool validate_card_format(const std::string& s) { static const boost::regex e("(\\d{4}[- ]){3}\\d{4}"); - return regex_match(s, e); + return boost::regex_match(s, e); } const boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z"); @@ -14,12 +14,12 @@ const std::string human_format("\\1-\\2-\\3-\\4"); std::string machine_readable_card_number(const std::string& s) { - return regex_merge(s, e, machine_format, boost::match_default | boost::format_sed); + return boost::regex_merge(s, e, machine_format, boost::match_default | boost::format_sed); } std::string human_readable_card_number(const std::string& s) { - return regex_merge(s, e, human_format, boost::match_default | boost::format_sed); + return boost::regex_merge(s, e, human_format, boost::match_default | boost::format_sed); } #include @@ -43,3 +43,4 @@ int main() } return 0; } + diff --git a/demo/snippets/snip2.cpp b/demo/snippets/snip2.cpp index d4bb4aeb..33d8a399 100644 --- a/demo/snippets/snip2.cpp +++ b/demo/snippets/snip2.cpp @@ -40,7 +40,7 @@ void IndexClasses(map_type& m, const std::string& file) end = file.end(); boost::match_results what; unsigned int flags = boost::match_default; - while(regex_search(start, end, what, expression, flags)) + while(boost::regex_search(start, end, what, expression, flags)) { // what[0] contains the whole string // what[5] contains the class name. @@ -103,3 +103,4 @@ int main(int argc, const char** argv) + diff --git a/demo/snippets/snip3.cpp b/demo/snippets/snip3.cpp index 5e0fcae4..fad975c6 100644 --- a/demo/snippets/snip3.cpp +++ b/demo/snippets/snip3.cpp @@ -56,7 +56,7 @@ void IndexClasses(map_type& m, const std::string& file) std::string::const_iterator start, end; start = file.begin(); end = file.end(); - regex_grep(IndexClassesPred(m, start), start, end, expression); + boost::regex_grep(IndexClassesPred(m, start), start, end, expression); } @@ -104,3 +104,4 @@ int main(int argc, const char** argv) + diff --git a/demo/snippets/snip4.cpp b/demo/snippets/snip4.cpp index 37d2b376..87124161 100644 --- a/demo/snippets/snip4.cpp +++ b/demo/snippets/snip4.cpp @@ -72,12 +72,12 @@ int main(int argc, const char** argv) // temporary string stream std::ostringstream t(std::ios::out | std::ios::binary); std::ostream_iterator oi(t); - regex_merge(oi, in.begin(), in.end(), e2, pre_format); + boost::regex_merge(oi, in.begin(), in.end(), e2, pre_format); // then output to final output stream // adding syntax highlighting: std::string s(t.str()); std::ostream_iterator out(os); - regex_merge(out, s.begin(), s.end(), e1, format_string); + boost::regex_merge(out, s.begin(), s.end(), e1, format_string); os << footer_text; } return 0; @@ -128,3 +128,4 @@ const char* footer_text = "\n\n\n"; + diff --git a/demo/snippets/snip5.cpp b/demo/snippets/snip5.cpp index e46df428..aa105df1 100644 --- a/demo/snippets/snip5.cpp +++ b/demo/snippets/snip5.cpp @@ -53,7 +53,7 @@ void IndexClasses(const std::string& file) start = file.begin(); end = file.end(); base = start; - regex_grep(grep_callback, start, end, expression); + boost::regex_grep(grep_callback, start, end, expression); } #include @@ -96,3 +96,4 @@ int main(int argc, const char** argv) } return 0; } + diff --git a/demo/snippets/snip6.cpp b/demo/snippets/snip6.cpp index cac9b72a..1073058c 100644 --- a/demo/snippets/snip6.cpp +++ b/demo/snippets/snip6.cpp @@ -66,7 +66,7 @@ void class_index::IndexClasses(const std::string& file) start = file.begin(); end = file.end(); base = start; - regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), this), + boost::regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), this), start, end, expression); @@ -115,3 +115,4 @@ int main(int argc, const char** argv) } + diff --git a/demo/snippets/snip7.cpp b/demo/snippets/snip7.cpp index 420b4d42..2120a6ed 100644 --- a/demo/snippets/snip7.cpp +++ b/demo/snippets/snip7.cpp @@ -69,7 +69,7 @@ void class_index::IndexClasses(const std::string& file) end = file.end(); base = start; class_index::grep_callback_type cl = &(this->grep_callback); - regex_grep(cl, + boost::regex_grep(cl, start, end, expression); @@ -118,3 +118,4 @@ int main(int argc, const char** argv) } +