Boost :: Regex DOTALL标志 [英] Boost::Regex DOTALL flag
本文介绍了Boost :: Regex DOTALL标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
boost :: regex有一个DOTALL匹配标志吗?文档显示:
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;
但未提及常规DOTALL。
but no mention of regular DOTALL.
我试图匹配一个python正则表达式写为
I'm trying to match a python regular expression written as
re.compile(r'<a(.*?)</a>', re.DOTALL)
推荐答案
我想你要找的是 mod_s
syntax_option_type 。您还可以使用内联修饰符(?s)
。
I think what you're looking for is the mod_s
syntax_option_type. You can also use the inline modifier, (?s)
.
这篇关于Boost :: Regex DOTALL标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文