summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2010-01-18 11:09:59 -0800
committerKaz Kylheku <kaz@kylheku.com>2010-01-18 11:09:59 -0800
commitcf64082d6fe266a75fa65194c0a11eba37ca458b (patch)
tree081891cc5f3322232068574af45049544382dcf1 /txr.1
parentd441f6ac5023b841b0fffff6580455319d5b49e9 (diff)
downloadtxr-cf64082d6fe266a75fa65194c0a11eba37ca458b.tar.gz
txr-cf64082d6fe266a75fa65194c0a11eba37ca458b.tar.bz2
txr-cf64082d6fe266a75fa65194c0a11eba37ca458b.zip
Spelling; enhanced wording.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.113
1 files changed, 8 insertions, 5 deletions
diff --git a/txr.1 b/txr.1
index 89867fd6..75e01403 100644
--- a/txr.1
+++ b/txr.1
@@ -639,7 +639,7 @@ with a backslash. Two backslashes code for one backslash. So
for instance [\e[\e-] means match a [ or - character, [^^] means match
any character other than ^, and [\e^\e\e] means match either a ^ or a
backslash. Regex operators such as *, + and & appearing in a character
-class represent ordinary characters. The characters -, ] and ^ occuring outside
+class represent ordinary characters. The characters -, ] and ^ occurring outside
of a character class 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,
@@ -3045,10 +3045,13 @@ expression .%abc. If you intend the trailing context to be merely a, you must
be careful to write (.%a)bc. Otherwise the trailing context is abc, and this
means that the .% match will consume the longest string that does not contain
"abc", when in fact what was intended was to consume the longest string that
-does not contain a. For single-character trailing contexts, it may be a good
-idea to use a complemented character class instead. That is to say, rather than
-(.%a)bc, how about [^a]*bc. The set of strings which don't contain the
-character a is adequately expressed by [^a]*.
+does not contain a. The change in behavior of the % operator upon modifying the
+trailing context is not as intuitive as that of the * operator, because the
+trailing context is deeply involved in its logic. For
+single-character trailing contexts, it may be a good idea to use a complemented
+character class instead. That is to say, rather than (.%a)bc, consider
+[^a]*bc. The set of strings which don't contain the character a is adequately
+expressed by [^a]*.
.SH NOTES ON FALSE