Przeglądaj źródła

string: Clarify regex documentation of '-' behavior

Mention that it is only special inside brackets.  Show an example.

Suggested-by: Alan W. Irwin
Brad King 13 lat temu
rodzic
commit
0ed6ff7a2e
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      Source/cmStringCommand.h

+ 2 - 1
Source/cmStringCommand.h

@@ -133,7 +133,8 @@ public:
       "   .         Matches any single character\n"
       "   [ ]       Matches any character(s) inside the brackets\n"
       "   [^ ]      Matches any character(s) not inside the brackets\n"
-      "    -        Matches any character in range on either side of a dash\n"
+      "    -        Inside brackets, specifies an inclusive range between\n"
+      "             characters on either side e.g. [a-f] is [abcdef]\n"
       "   *         Matches preceding pattern zero or more times\n"
       "   +         Matches preceding pattern one or more times\n"
       "   ?         Matches preceding pattern zero or once only\n"