aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-11-10 20:40:16 +1000
committerSteve Bennett <steveb@workware.net.au>2016-02-03 11:42:52 +1000
commit41289bf3985ed0b4777163073aee5c2c6ca5038b (patch)
tree1aa7c055dbb1c805dd3e91e24c031f152b7d1220
parent8df5aa2338453ebecb561df96a7c11d356400d77 (diff)
downloadjimtcl-41289bf3985ed0b4777163073aee5c2c6ca5038b.zip
jimtcl-41289bf3985ed0b4777163073aee5c2c6ca5038b.tar.gz
jimtcl-41289bf3985ed0b4777163073aee5c2c6ca5038b.tar.bz2
regexp: document new character classes and constraint escapes
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim_tcl.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index ed48276..087ac4a 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -1025,14 +1025,15 @@ This engine supports UTF-8 as well as some +ARE+ features. The differences with
and POSIX are highlighted below.
1. UTF-8 strings and patterns are both supported
-2. Supported character classes: +[:alnum:]+, +[:digit:]+ and +[:space:]+
-3. Supported shorthand character classes: +{backslash}w+ = +[:alnum:]+, +{backslash}d+ = +[:digit:],+ +{backslash}s+ = +[:space:]+
-4. Character classes apply to ASCII characters only
+2. All Tcl character classes are supported (e.g. +[:alnum:]+, +[:digit:]+, +[:space:]+), but...
+3. Character classes apply to ASCII characters only
+4. Supported shorthand character classes: +{backslash}w+ = +[:alnum:]+, +{backslash}W+ = +^[:alnum:]+, +{backslash}d+ = +[:digit:],+ +{backslash}D+ = +^[:digit:],+ +{backslash}s+ = +[:space:]+, + +{backslash}S+ = +^[:space:]+
5. Supported constraint escapes: +{backslash}m+ = +{backslash}<+ = start of word, +{backslash}M+ = +{backslash}>+ = end of word
6. Backslash escapes may be used within regular expressions, such as +{backslash}n+ = newline, +{backslash}uNNNN+ = unicode
-7. Support for the +?+ non-greedy quantifier. e.g. +*?+
-8. Support for non-capturing parentheses +(?:...)+
-9. Jim Tcl considers that both patterns and strings end at a null character (+\x00+)
+7. Partially supported constraint escapes: +{backslash}A+ = start of string, +{backslash}Z+ = end of string
+8. Support for the +?+ non-greedy quantifier. e.g. +*?+
+9. Support for non-capturing parentheses +(?:...)+
+10. Jim Tcl considers that both patterns and strings end at a null character (+\x00+)
COMMAND RESULTS
---------------