From 41289bf3985ed0b4777163073aee5c2c6ca5038b Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sun, 10 Nov 2013 20:40:16 +1000 Subject: regexp: document new character classes and constraint escapes Signed-off-by: Steve Bennett --- jim_tcl.txt | 13 +++++++------ 1 file 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 --------------- -- cgit v1.1