aboutsummaryrefslogtreecommitdiff
path: root/tests/regcount.test
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2017-12-22 12:57:03 +1000
committerSteve Bennett <steveb@workware.net.au>2017-12-31 11:45:53 +1000
commit2d2f74ebfeeb056130a37fec19189766a85cec81 (patch)
tree9f070ca7d6641b4d7fb8e3ec6ea423d2db5062d5 /tests/regcount.test
parentdde3b217dacb724ea4b6f86a8f7095d73e80674f (diff)
downloadjimtcl-2d2f74ebfeeb056130a37fec19189766a85cec81.zip
jimtcl-2d2f74ebfeeb056130a37fec19189766a85cec81.tar.gz
jimtcl-2d2f74ebfeeb056130a37fec19189766a85cec81.tar.bz2
regexp: Implement class shorthand escapes in brackets
The following class shorthand escapes now match Tcl when used within bracket expressions: \d [[:digit:]] \s [[:space:]] \w [[:alnum:]_] (note underscore) e.g. [a-f\d] => [a-f0-9] Previously these shorthand escapes were only implemented outside bracket expressions. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/regcount.test')
-rw-r--r--tests/regcount.test1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/regcount.test b/tests/regcount.test
index 96f4ddd..5c1469e 100644
--- a/tests/regcount.test
+++ b/tests/regcount.test
@@ -84,6 +84,7 @@ foreach {pat str exp} {
(a|y){5,6}? baaaad {}
{[[:alpha:]]+} _bcd56_ef bcd
{[[:alnum:]]+} _bcd56_ef bcd56
+ {[\w]+} :_bcd56_ef _bcd56_ef
{[[:space:]]+} "_bc \t\r\n\f\v_" "{ \t\r\n\f\v}"
{[\x41-\x43]+} "_ABCD_" ABC
{\m.+\M} "#A test#" "{A test}"