views:

264

answers:

1

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  A: 

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

Alan Moore
@whatWhat: here's how to use the inline DOT-ALL modifier: `boost::regex e("(?s)<a(.*?)</a>");`
Bart Kiers