diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 6345b1b8988..70bb6b04abd 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1125,6 +1125,18 @@ ends of the range in upper case, or both in lower case, or both should be non-letters. The behavior of a mixed-case range such as @samp{A-z} is somewhat ill-defined, and it may change in future Emacs versions. +To search for raw bytes (@pxref{International Chars}) using regular +expressions, specify their codepoints in the bracket expression, as in +@w{@kbd{C-M-s [ C-x 8 @key{RET} 3fff80 @key{RET} - C-x 8 @key{RET} +3fffff @key{RET} ]}}. Emacs will show the equivalent + +@example +Regexp I-search: [\200-\377] +@end example + +@noindent +in the echo area. + @item @kbd{[^ @dots{} ]} @samp{[^} begins a @dfn{complemented character set}, which matches any character except the ones specified. Thus, @samp{[^a-z0-9A-Z]} matches diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 9481782d552..a1354d30c07 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -444,6 +444,12 @@ 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. + +@cindex raw bytes, regexps for searching +@item +To search for @dfn{raw bytes}, which are characters belonging to the +@code{eight-bit} character set (@pxref{Character Sets}), you can use +@samp{[\200-\377]} or @samp{[\x3fff80-\x3fffff]} @end enumerate Some kinds of bracket expressions are not the best style even