aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-02-26 09:55:45 +0000
committerRichard M. Stallman2003-02-26 09:55:45 +0000
commitf31431028fbeef4d4ebc3620b0498aa3856514b6 (patch)
tree2cf31a9005cdee6632b3bdaf46be61d05a4fcb59
parent6a080ff1ea639fc1f863498a3b33fb8ab384aa9b (diff)
downloademacs-f31431028fbeef4d4ebc3620b0498aa3856514b6.tar.gz
emacs-f31431028fbeef4d4ebc3620b0498aa3856514b6.zip
(Regexps): Convert the main table into @table @asis.
-rw-r--r--man/search.texi26
1 files changed, 13 insertions, 13 deletions
diff --git a/man/search.texi b/man/search.texi
index a9d5b5e9ba5..44b14ae008d 100644
--- a/man/search.texi
+++ b/man/search.texi
@@ -413,14 +413,14 @@ and @samp{o} to get the regular expression @samp{fo}, which matches only
413the string @samp{fo}. Still trivial. To do something nontrivial, you 413the string @samp{fo}. Still trivial. To do something nontrivial, you
414need to use one of the special characters. Here is a list of them. 414need to use one of the special characters. Here is a list of them.
415 415
416@table @kbd 416@table @asis
417@item .@: @r{(Period)} 417@item @kbd{.}@: @r{(Period)}
418is a special character that matches any single character except a newline. 418is a special character that matches any single character except a newline.
419Using concatenation, we can make regular expressions like @samp{a.b}, which 419Using concatenation, we can make regular expressions like @samp{a.b}, which
420matches any three-character string that begins with @samp{a} and ends with 420matches any three-character string that begins with @samp{a} and ends with
421@samp{b}.@refill 421@samp{b}.@refill
422 422
423@item * 423@item @kbd{*}
424is not a construct by itself; it is a postfix operator that means to 424is not a construct by itself; it is a postfix operator that means to
425match the preceding regular expression repetitively as many times as 425match the preceding regular expression repetitively as many times as
426possible. Thus, @samp{o*} matches any number of @samp{o}s (including no 426possible. Thus, @samp{o*} matches any number of @samp{o}s (including no
@@ -441,18 +441,18 @@ tries to match all three @samp{a}s; but the rest of the pattern is
441The next alternative is for @samp{a*} to match only two @samp{a}s. 441The next alternative is for @samp{a*} to match only two @samp{a}s.
442With this choice, the rest of the regexp matches successfully.@refill 442With this choice, the rest of the regexp matches successfully.@refill
443 443
444@item + 444@item @kbd{+}
445is a postfix operator, similar to @samp{*} except that it must match 445is a postfix operator, similar to @samp{*} except that it must match
446the preceding expression at least once. So, for example, @samp{ca+r} 446the preceding expression at least once. So, for example, @samp{ca+r}
447matches the strings @samp{car} and @samp{caaaar} but not the string 447matches the strings @samp{car} and @samp{caaaar} but not the string
448@samp{cr}, whereas @samp{ca*r} matches all three strings. 448@samp{cr}, whereas @samp{ca*r} matches all three strings.
449 449
450@item ? 450@item @kbd{?}
451is a postfix operator, similar to @samp{*} except that it can match the 451is a postfix operator, similar to @samp{*} except that it can match the
452preceding expression either once or not at all. For example, 452preceding expression either once or not at all. For example,
453@samp{ca?r} matches @samp{car} or @samp{cr}; nothing else. 453@samp{ca?r} matches @samp{car} or @samp{cr}; nothing else.
454 454
455@item *?, +?, ?? 455@item @kbd{*?}, @kbd{+?}, @kbd{??}
456@cindex non-greedy regexp matching 456@cindex non-greedy regexp matching
457are non-greedy variants of the operators above. The normal operators 457are non-greedy variants of the operators above. The normal operators
458@samp{*}, @samp{+}, @samp{?} are @dfn{greedy} in that they match as 458@samp{*}, @samp{+}, @samp{?} are @dfn{greedy} in that they match as
@@ -473,13 +473,13 @@ you search for @samp{a.*?$} against the text @samp{abbab} followed by
473a newline, it matches the whole string. Since it @emph{can} match 473a newline, it matches the whole string. Since it @emph{can} match
474starting at the first @samp{a}, it does. 474starting at the first @samp{a}, it does.
475 475
476@item \@{@var{n}\@} 476@item @kbd{\@{@var{n}\@}}
477is a postfix operator that specifies repetition @var{n} times---that 477is a postfix operator that specifies repetition @var{n} times---that
478is, the preceding regular expression must match exactly @var{n} times 478is, the preceding regular expression must match exactly @var{n} times
479in a row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx} 479in a row. For example, @samp{x\@{4\@}} matches the string @samp{xxxx}
480and nothing else. 480and nothing else.
481 481
482@item \@{@var{n},@var{m}\@} 482@item @kbd{\@{@var{n},@var{m}\@}}
483is a postfix operator that specifies repetition between @var{n} and 483is a postfix operator that specifies repetition between @var{n} and
484@var{m} times---that is, the preceding regular expression must match 484@var{m} times---that is, the preceding regular expression must match
485at least @var{n} times, but no more than @var{m} times. If @var{m} is 485at least @var{n} times, but no more than @var{m} times. If @var{m} is
@@ -488,7 +488,7 @@ expression must match at least @var{n} times.@* @samp{\@{0,1\@}} is
488equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to 488equivalent to @samp{?}. @* @samp{\@{0,\@}} is equivalent to
489@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}. 489@samp{*}. @* @samp{\@{1,\@}} is equivalent to @samp{+}.
490 490
491@item [ @dots{} ] 491@item @kbd{[ @dots{} ]}
492is a @dfn{character set}, which begins with @samp{[} and is terminated 492is a @dfn{character set}, which begins with @samp{[} and is terminated
493by @samp{]}. In the simplest case, the characters between the two 493by @samp{]}. In the simplest case, the characters between the two
494brackets are what this set can match. 494brackets are what this set can match.
@@ -523,7 +523,7 @@ ends of the range in upper case, or both in lower case, or both should
523be non-letters. The behavior of a mixed-case range such as @samp{A-z} 523be non-letters. The behavior of a mixed-case range such as @samp{A-z}
524is somewhat ill-defined, and it may change in future Emacs versions. 524is somewhat ill-defined, and it may change in future Emacs versions.
525 525
526@item [^ @dots{} ] 526@item @kbd{[^ @dots{} ]}
527@samp{[^} begins a @dfn{complemented character set}, which matches any 527@samp{[^} begins a @dfn{complemented character set}, which matches any
528character except the ones specified. Thus, @samp{[^a-z0-9A-Z]} matches 528character except the ones specified. Thus, @samp{[^a-z0-9A-Z]} matches
529all characters @emph{except} ASCII letters and digits. 529all characters @emph{except} ASCII letters and digits.
@@ -536,17 +536,17 @@ A complemented character set can match a newline, unless newline is
536mentioned as one of the characters not to match. This is in contrast to 536mentioned as one of the characters not to match. This is in contrast to
537the handling of regexps in programs such as @code{grep}. 537the handling of regexps in programs such as @code{grep}.
538 538
539@item ^ 539@item @kbd{^}
540is a special character that matches the empty string, but only at the 540is a special character that matches the empty string, but only at the
541beginning of a line in the text being matched. Otherwise it fails to 541beginning of a line in the text being matched. Otherwise it fails to
542match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at 542match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at
543the beginning of a line. 543the beginning of a line.
544 544
545@item $ 545@item @kbd{$}
546is similar to @samp{^} but matches only at the end of a line. Thus, 546is similar to @samp{^} but matches only at the end of a line. Thus,
547@samp{x+$} matches a string of one @samp{x} or more at the end of a line. 547@samp{x+$} matches a string of one @samp{x} or more at the end of a line.
548 548
549@item \ 549@item @kbd{\}
550has two functions: it quotes the special characters (including 550has two functions: it quotes the special characters (including
551@samp{\}), and it introduces additional special constructs. 551@samp{\}), and it introduces additional special constructs.
552 552