Boost::Regex DOTALL flag
Asked Answered
C

1

0

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)
Catchup answered 11/11, 2009 at 2:50 Comment(0)
C
1

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

Clod answered 11/11, 2009 at 5:0 Comment(1)
@whatWhat: here's how to use the inline DOT-ALL modifier: boost::regex e("(?s)<a(.*?)</a>");Kleeman

© 2022 - 2024 — McMap. All rights reserved.