diff options
author | Brad King <brad.king@kitware.com> | 2017-04-18 18:42:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-18 18:44:50 (GMT) |
commit | a0091a697e275a86a493e4fd87902a0eb9067d55 (patch) | |
tree | 749b91839b24d2bbeea36c43dc23683a82b8d44c /Help | |
parent | afc492d58f0af07d57256be3ac45ac70afecc256 (diff) | |
download | CMake-a0091a697e275a86a493e4fd87902a0eb9067d55.zip CMake-a0091a697e275a86a493e4fd87902a0eb9067d55.tar.gz CMake-a0091a697e275a86a493e4fd87902a0eb9067d55.tar.bz2 |
Help: Format string() command regex specification docs
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/string.rst | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/Help/command/string.rst b/Help/command/string.rst index 698a91d..7199178 100644 --- a/Help/command/string.rst +++ b/Help/command/string.rst @@ -82,26 +82,36 @@ Regex Specification The following characters have special meaning in regular expressions: -:: - - ^ Matches at beginning of input - $ Matches at end of input - . Matches any single character - [ ] Matches any character(s) inside the brackets - [^ ] Matches any character(s) not inside the brackets - - Inside brackets, specifies an inclusive range between - characters on either side e.g. [a-f] is [abcdef] - To match a literal - using brackets, make it the first - or the last character e.g. [+*/-] matches basic - mathematical operators. - * Matches preceding pattern zero or more times - + Matches preceding pattern one or more times - ? Matches preceding pattern zero or once only - | Matches a pattern on either side of the | - () Saves a matched subexpression, which can be referenced - in the REGEX REPLACE operation. Additionally it is saved - by all regular expression-related commands, including - e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9). +``^`` + Matches at beginning of input +``$`` + Matches at end of input +``.`` + Matches any single character +``[ ]`` + Matches any character(s) inside the brackets +``[^ ]`` + Matches any character(s) not inside the brackets +``-`` + Inside brackets, specifies an inclusive range between + characters on either side e.g. ``[a-f]`` is ``[abcdef]`` + To match a literal ``-`` using brackets, make it the first + or the last character e.g. ``[+*/-]`` matches basic + mathematical operators. +``*`` + Matches preceding pattern zero or more times +``+`` + Matches preceding pattern one or more times +``?`` + Matches preceding pattern zero or once only +``|`` + Matches a pattern on either side of the ``|`` +``()`` + Saves a matched subexpression, which can be referenced + in the ``REGEX REPLACE`` operation. Additionally it is saved + by all regular expression-related commands, including + e.g. :command:`if(MATCHES)`, in the variables + ``CMAKE_MATCH_<n>`` for ``<n>`` 0..9. ``*``, ``+`` and ``?`` have higher precedence than concatenation. ``|`` has lower precedence than concatenation. This means that the regular |