Boost::Regex DOTALL flag

本秂侑毒 提交于 2019-12-25 04:55:19

问题


Is there a DOTALL matching flag for boost::regex? The documentation shows:

static const match_flag_type match_not_dot_newline;
static const match_flag_type match_not_dot_null;

but no mention of regular DOTALL.

I'm trying to match a python regular expression written as

re.compile(r'<a(.*?)</a>', re.DOTALL)

回答1:


I think what you're looking for is the mod_s syntax_option_type. You can also use the inline modifier, (?s).



来源:https://stackoverflow.com/questions/1712696/boostregex-dotall-flag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!