Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Tag Archives: cmake string regex annoyance

CMake String regex match annoyance

CMake has a regex string matching function STRING(REGEX MATCH … ), but it does not work as normal regex should. Firstly, as quite a bit people already aware of, it does not recognize the beginning-of-string ‘^’ and end-of-string ‘$’.

I also recently found that ‘;’ in the input string will be stripped, so be aware of that.

Advertisements