Difference between regex_match and regex_search?

前端 未结 4 1964
渐次进展
渐次进展 2020-12-06 09:02

I was experimenting with regular expression in trying to make an answer to this question, and found that while regex_match finds a match, regex_search

4条回答
  •  死守一世寂寞
    2020-12-06 09:59

    Looking through the latest libstdc++ source code for regex_search, you will find:

    * @todo Implement this function.
    

    Unfortunately this is not the only TODO item left. GCC's implementation is currently incomplete. I recommend using Boost or Clang and #ifdef the code until GCC has caught up.

    (This has neither been fixed in the 4.8 branch.)

提交回复
热议问题