@@ -106,10 +106,14 @@ sherlock!(the_whitespace, r"the\s+\w+", 5410);
106106#[ cfg( not( feature = "re-pcre1" ) ) ]
107107#[ cfg( not( feature = "re-pcre2" ) ) ]
108108#[ cfg( not( feature = "re-stdcpp" ) ) ]
109+ #[ cfg( not( feature = "re-boost" ) ) ]
109110#[ cfg( not( feature = "re-tcl" ) ) ]
110111sherlock ! ( everything_greedy, r".*" , 13053 ) ;
111112// std::regex . does not match \r
112- #[ cfg( feature = "re-stdcpp" ) ]
113+ #[ cfg( any(
114+ feature = "re-stdcpp" ,
115+ feature = "re-boost" ,
116+ ) ) ]
113117sherlock ! ( everything_greedy, r"[^\n]*" , 13053 ) ;
114118#[ cfg( not( feature = "re-dphobos" ) ) ]
115119#[ cfg( not( feature = "re-onig" ) ) ]
@@ -122,24 +126,34 @@ sherlock!(everything_greedy_nl, r"(?s).*", 1);
122126
123127// How fast can we match every letter? This also defeats any clever prefix
124128// tricks.
129+ // std C++ does not support unicode character classes
125130#[ cfg( not( feature = "re-stdcpp" ) ) ]
131+ #[ cfg( not( feature = "re-boost" ) ) ]
126132#[ cfg( not( feature = "re-tcl" ) ) ]
127133sherlock ! ( letters, r"\p{L}" , 447160 ) ;
128134
135+ // std C++ does not support unicode character classes
129136#[ cfg( not( feature = "re-stdcpp" ) ) ]
137+ #[ cfg( not( feature = "re-boost" ) ) ]
130138#[ cfg( not( feature = "re-tcl" ) ) ]
131139sherlock ! ( letters_upper, r"\p{Lu}" , 14180 ) ;
132140
141+ // std C++ does not support unicode character classes
133142#[ cfg( not( feature = "re-stdcpp" ) ) ]
143+ #[ cfg( not( feature = "re-boost" ) ) ]
134144#[ cfg( not( feature = "re-tcl" ) ) ]
135145sherlock ! ( letters_lower, r"\p{Ll}" , 432980 ) ;
136146
137147// Similarly, for words.
138- #[ cfg( not( feature = "re-re2" ) ) ]
139148#[ cfg( not( feature = "re-stdcpp" ) ) ]
149+ #[ cfg( not( feature = "re-boost" ) ) ]
150+ #[ cfg( not( feature = "re-re2" ) ) ]
140151sherlock ! ( words, r"\w+" , 109214 ) ;
141- #[ cfg( feature = "re-re2" ) ]
142- #[ cfg( feature = "re-stdcpp" ) ]
152+ #[ cfg( any(
153+ feature = "re-stdcpp" ,
154+ feature = "re-boost" ,
155+ feature = "re-re2" ,
156+ ) ) ]
143157sherlock ! ( words, r"\w+" , 109222 ) ; // hmm, why does RE2 diverge here?
144158
145159// Find complete words before Holmes. The `\w` defeats any prefix
@@ -162,6 +176,7 @@ sherlock!(holmes_cochar_watson, r"Holmes.{0,25}Watson|Watson.{0,25}Holmes", 7);
162176#[ cfg( not( feature = "re-pcre1" ) ) ]
163177#[ cfg( not( feature = "re-pcre2" ) ) ]
164178#[ cfg( not( feature = "re-stdcpp" ) ) ]
179+ #[ cfg( not( feature = "re-boost" ) ) ]
165180#[ cfg( not( feature = "re-tcl" ) ) ]
166181sherlock ! (
167182 holmes_coword_watson,
@@ -178,13 +193,17 @@ sherlock!(quotes, r#"["'][^"']{0,30}[?!.]["']"#, 767);
178193// lazy DFA the entire way.
179194// std C++ does not support multiline until C++17 nor the inline modifier syntax
180195#[ cfg( not( feature = "re-stdcpp" ) ) ]
196+ #[ cfg( not( feature = "re-boost" ) ) ]
181197#[ cfg( not( feature = "re-dphobos" ) ) ]
182198sherlock ! (
183199 line_boundary_sherlock_holmes,
184200 r"(?m)^Sherlock Holmes|Sherlock Holmes$" ,
185201 34 ) ;
186202// D matches both \r\n and \n as EOL
187- #[ cfg( feature = "re-dphobos" ) ]
203+ #[ cfg( any(
204+ feature = "re-boost" ,
205+ feature = "re-dphobos" ,
206+ ) ) ]
188207sherlock ! (
189208 line_boundary_sherlock_holmes,
190209 r"(?m)^Sherlock Holmes|Sherlock Holmes$" ,
0 commit comments