string: Clarify regex documentation of '-' behavior

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

Suggested-by: Alan W. Irwin
This commit is contained in:
Brad King 2012-10-08 09:32:15 -04:00
parent 60b59a54c1
commit 0ed6ff7a2e
1 changed files with 2 additions and 1 deletions

View File

@ -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"