5
我使用VS2010和编码C++控制台应用程序和所面临的问题regex_match有什么问题?很简单的表达
#include <regex>
using namespace std;
//...
if (!regex_match("abab",regex("(ab?)*")))
{
//the problem is - why we are here? why it doesn't match?
}
这里http://regexpal.com/检查 - 它匹配
正则表达式库的很多实现都是粗略的,特别是在VS 2010中。请记住,VS 2010不是** C++ 11编译器,它只支持_some_ C++ 11功能。 – 2014-09-01 15:42:45
@CaptainObvlious你是对的!我在VS2012中测试它,这正是正则表达式匹配我的方式。 – 2014-09-01 15:47:00
[与海湾合作委员会合作](http://coliru.stacked-crooked.com/a/65f607082de2cc06)。 – 2014-09-01 15:51:16