Does C or C++ have a standard regex library?

前端 未结 9 796
梦毁少年i
梦毁少年i 2021-02-05 10:36

Does it? If yes, where can I get the documentation for it... if not, then which would be the best alternative?

9条回答
  •  佛祖请我去吃肉
    2021-02-05 11:05

    C++11 now finally does have a standard regex library - std::regex.

    If you do not have access to a C++11 implementation, a good alternative could be boost regex. It isn't completely equivalent to std::regex (e.g. the "empty()" method is not in the std::regex) but it's a very mature regex implementation for C++ none the less.

提交回复
热议问题