summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-04-19 21:54:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-04-19 21:54:09 -0700
commit2614361741b85a71b06fc4d70538e0b5d8fb660b (patch)
tree549e3075d38f34301f86dcc00725070b90548f2f /txr.1
parent66a38d816de5d5932fd2d99c74538c43422ad44a (diff)
downloadtxr-2614361741b85a71b06fc4d70538e0b5d8fb660b.tar.gz
txr-2614361741b85a71b06fc4d70538e0b5d8fb660b.tar.bz2
txr-2614361741b85a71b06fc4d70538e0b5d8fb660b.zip
* txr.1: Documented new regex tokens.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.116
1 files changed, 15 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 81583d97..48358cc6 100644
--- a/txr.1
+++ b/txr.1
@@ -846,9 +846,13 @@ supports the following syntax:
Character class: matches a single character, from the set specified by
special syntax written between the square brackets.
Supports basic regexp character class syntax; no POSIX
-notation like [:digit:]. The class [a-zA-Z] means match an uppercase
+notation like [:digit:]. The regex tokens \es, \ed and \ew are
+permitted in character classes, but not their complementing counterparts.
+These tokens simply contribute their characters to the class.
+The class [a-zA-Z] means match an uppercase
or lowercase letter; the class [0-9a-f] means match a digit or
a lowercase letter; the class [^0-9] means match a non-digit, et cetera.
+The class [\ed.] means match a digit or the period character.
A ] or - can be used within a character class, but must be escaped
with a backslash. A ^ in the first position denotes a complemented
class, unless it is escaped by backslash. In any other position, it denotes
@@ -861,6 +865,16 @@ are ordinary. Unescaped / characters can appear within a character class. The
empty character class [] matches no character at all, and its complement [^]
matches any character, and is treated as a synonym for the . (period) wildcard
operator.
+.IP "\es, \ew and \ed"
+These regex tokens each match a single character.
+The \es regex token matches a wide variety of ASCII whitespace characters
+and Unicode spaces. The \ew token matches alphabetic word characters; it
+is equivalent to the character class [A-Za-z_]. The \ed token matches
+a digit, and is equivalent to [0-9].
+.IP "\eS, \eW and \eD"
+These regex tokens are the complemented counterparts of \es, \ew and \ed.
+The \eS token matches all those characters which \es does not match,
+\eW matches all characters that \ew does not match and \eD matches nondigits.
.IP empty
An empty expression is a regular expression. It represents the set of strings
consisting of the empty string; i.e. it matches just the empty string. The