diff options
author | Glenn Morris <rgm@gnu.org> | 2021-05-31 07:50:34 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2021-05-31 07:50:34 -0700 |
commit | b7c1b81ffbebb4d821a52bd1f502ed94562721e1 (patch) | |
tree | 86484cbc438a706808b96c891b1aeae1919dbac7 /doc/lispref/searching.texi | |
parent | 6e2d3bce087d30a535b1f01715d7820576ffe390 (diff) | |
parent | 5dfa5e26dd58c6e8aa135c81ecfdbda92725556e (diff) | |
download | emacs-b7c1b81ffbebb4d821a52bd1f502ed94562721e1.tar.gz |
Merge from origin/emacs-27
5dfa5e26dd (origin/emacs-27) Improve documentation of regexp ranges
Diffstat (limited to 'doc/lispref/searching.texi')
-rw-r--r-- | doc/lispref/searching.texi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index b38ee995abe..1d3e2d986c5 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -368,7 +368,7 @@ preceding expression either once or not at all. For example, @anchor{Non-greedy repetition} @item @samp{*?}, @samp{+?}, @samp{??} @cindex non-greedy repetition characters in regexp -These are @dfn{non-greedy} variants of the operators @samp{*}, @samp{+} +are @dfn{non-greedy} variants of the operators @samp{*}, @samp{+} and @samp{?}. Where those operators match the largest possible substring (consistent with matching the entire containing expression), the non-greedy variants match the smallest possible substring @@ -443,6 +443,13 @@ including newline. However, a reversed range should always be from the letter @samp{z} to the letter @samp{a} to make it clear that it is not a typo; for example, @samp{[+-*/]} should be avoided, because it matches only @samp{/} rather than the likely-intended four characters. + +@item +If the end points of a range are raw 8-bit bytes (@pxref{Text +Representations}), or if the range start is ASCII and the end is a raw +byte (as in @samp{[a-\377]}), the range will match only ASCII +characters and raw 8-bit bytes, but not non-ASCII characters. This +feature is intended for searching text in unibyte buffers and strings. @end enumerate Some kinds of character alternatives are not the best style even |