I'm looking for a regex to match every file begining with a "." in a directory.
I'm using CMake (from CMake doc : "CMake expects regular expressions, not globs") and want to ignore every file begining with a dot (hidden files) BUT "\..*"
or "^\..*"
doesn't work :(
The strange thing : this works (thanks to rq's answer) and remove every hidden files and temp files ("~" terminated files)
file(GLOB DOT ".*")
file(GLOB TILD "*~")
set (CPACK_SOURCE_IGNORE_FILES "${DOT};${TILD}")
But I can't find the right thing to write directly into CPACK_SOURCE_IGNORE_FILES
to have the same result!
Here is the "doc" of this variable.