请问C或C ++有一个标准的正则表达式库? [英] Does C or C++ have a standard regex library?

查看:156
本文介绍了请问C或C ++有一个标准的正则表达式库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是吗?如果是的话,我在哪里可以得到它的文档......如果没有,那么这将是最好的选择?

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

推荐答案

C ++ 11现在终于确实有一个的标准的正则表达式库 - 的std ::正则表达式

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

如果您没有访问C ++ 11的实现,一个很好的选择可能是的boost正则表达式。它不完全等同于性病::正则表达式(如空() 法不在的std ::正则表达式),但它是对C非常成熟的正则表达式执行++没有少。

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.

这篇关于请问C或C ++有一个标准的正则表达式库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆