Hello again, i've the following variable defined: set(WITH_LIB_GLAD_EXAMPLE_BASIC 1) And the if the line foreach(_var VARIABLES) if(_var MATCHES "WITH_LIB_GLAD_EXAMPLE_([A-Za-z]+)") message(STATUS "Found a match") endforeach() I never get the message "Found match", what am i doing wrong here ??