On 11/20/2015 02:43 PM, Georg Baum wrote:
> Scott Kostyshak wrote:
>
>> I was hoping the recent commit fixing regex issues would fix the failing
>> test (test_biblio) of 'make check'. I just wanted to confirm that the
>> test fails for others on current master also.
> It does. The reason is that the output of escape_special_chars() changes 
> when compiling with std::regex. The attached patch would fix the test for 
> std::regex, but then make check would fail when using boost::regex.
>
> This shows that the regex engines we use do still interpret the expressions 
> in different ways, and I believe I also know the reason: The expressions 
> have changed to ECMAScript syntax, but the boost::regex engine does not 
> default to ECMAScript, but to boost perl style. Therefore, we do now have 
> exactly the inverted situation than before dbce5cafcc167: regexes are 
> interpreted correctly when using std::regx, but not when using boost::regex.
>
> What needs to be done now is to call boost::regex in ECMAScript mode. Then  
> escape_special_chars() will produce the same output for both regex engines. 
> What I am not 100% sure yet is whether it is correct, there seem to be too 
> many backslashes.

This is a bit worrying, and it makes me wonder about the wisdom of
trying to support different regex engines. What was the reason not just
to use the boost one? if only for consistency?

Richard

Reply via email to