[cmake-developers] slow regex implementation in RegularExpression
Alexandru Ciobanu
alex at rogue-research.com
Wed Nov 23 12:34:31 EST 2011
On 2011-11-23, at 12:24 PM, Brad King wrote:
> On 11/23/2011 12:20 PM, Alexandru Ciobanu wrote:
>> to compile ITK using CMake+TRE. And there was at least one regex that
>> TRE refused to compile.
>
> What was it, and where in the ITK code is it?
The regex in question is:
^[^][:/*?]+\$
And it appears at this location in the ITK source tree:
CMake/ExternalData.cmake:347
And the expression is correct, because you're allowed to have the ] metacharacter inside a [^xyz] class if it comes immediately after ^.
TRE does not do it the same way, see (http://laurikari.net/tre/documentation/regex-syntax/ the "Bracket expressions" section):
> To include a literal ] in the list, make it either the first item, the second endpoint of a range, or enclose it in [. and.].
sincerely,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20111123/2852385e/attachment-0001.htm>
More information about the cmake-developers
mailing list