On Thursday 17 November 2011, Alexandru Ciobanu wrote: > On 2011-11-17, at 3:26 PM, Alexander Neundorf wrote: > >> [ Regular expressions syntax ] > >> In terms of regular expressions syntax, the only difference that I've > >> seen is that TRE treats the curly brackets "{" and "}" as special > >> characters, because it uses them for its "approximate matching". > >> Details here: http://laurikari.net/tre/documentation/regex-syntax/ > >> > >> The only CMake component that uses curly brackets in a regexp is: > >> Modules/FindJNI.cmake > >> > >> but it was trivial to fix because they were used as mere delimiters. > > > > Well, but there are cmake files out there (i.e. all existing cmake-based > > projects) which also must behave basically exactly the same as before, > > otherwise their builds might break. > > > > Not sure how to achieve this. > > A policy ? > > Actually it is very easy to make it transparent and thus not need to modify > any .cmake files. > > We just need to escape the curly brackets: > { -> \{ > } -> \} > in the regular expression before compiling it. > > This way we'll have full compatibility with previous regexp syntax.
Hmm, I think there are more differences: http://laurikari.net/tre/documentation/regex-syntax/ Currently AFAIK cmake doesn't support all that, e.g. [[:digit:]] or \\d. So, currently a regex could contain "[[:digit:]]", which matches something right now, and something else then. There are more. It is nice that this implementation supports more, but it potentially introduces changes in behaviour i.e. incompatibilities. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers