I'm frustrated with CMake because I've just spent the last 30 minutes trying to get a simple regex to work. Could anyone please point out to me what I'm doing wrong?
I'd just like to extract all digits from the input string... it can't get much simpler than that?
string(REGEX MATCH "([0-9]*)" XYZ "MS990C")
message("found ${XYZ}")
All I get from CMake is an error telling me:
string sub-command REGEX, mode MATCH regex "([0-9]*)" matched an empty string.
And the string which is supposed to contain "990" is empty.