问题
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