summaryrefslogtreecommitdiffstats
path: root/Tests/RegexEscapeString.cmake
blob: 92aed17b1fecd50b83312672f049ddc6d433021a (plain)
1
2
3
4
macro(REGEX_ESCAPE_STRING _OUT _IN)
    # Escape special regex metacharacters with a backslash
    string(REGEX REPLACE "([$^.[|*+?()]|])" "\\\\\\1" ${_OUT} "${_IN}")
endmacro()