@end deffn
@deffn Command word-search-forward string &optional limit noerror repeat
-@c @cindex word search Redundant
This function searches forward from point for a ``word'' match for
@var{string}. If it finds a match, it sets point to the end of the
match found, and returns the new value of point.
-@c Emacs 19 feature
Word matching regards @var{string} as a sequence of words, disregarding
punctuation that separates them. It searches the buffer for the same
times. Point is positioned at the end of the last match.
@end deffn
+@deffn Command word-search-forward-lax string &optional limit noerror repeat
+This command is identical to @code{word-search-forward}, except that
+the end of @code{string} need not match a word boundary unless it ends
+in whitespace. For instance, searching for @samp{ball boy} matches
+@samp{ball boyee}, but does not match @samp{aball boy}.
+@end deffn
+
@deffn Command word-search-backward string &optional limit noerror repeat
This function searches backward from point for a word match to
@var{string}. This function is just like @code{word-search-forward}
beginning of the match.
@end deffn
+@deffn Command word-search-backward-lax string &optional limit noerror repeat
+This command is identical to @code{word-search-backward}, except that
+the end of @code{string} need not match a word boundary unless it ends
+in whitespace.
+@end deffn
+
@node Searching and Case
@section Searching and Case
@cindex searching and case
@code{case-fold-search} for buffers that do not override it.
Note that the user-level incremental search feature handles case
-distinctions differently. When given a lower case letter, it looks for
-a match of either case, but when given an upper case letter, it looks
-for an upper case letter only. But this has nothing to do with the
-searching functions used in Lisp code.
-
-@defopt case-replace
-This variable determines whether the higher level replacement
-functions should preserve case. If the variable is @code{nil}, that
-means to use the replacement text verbatim. A non-@code{nil} value
-means to convert the case of the replacement text according to the
-text being replaced.
-
-This variable is used by passing it as an argument to the function
-@code{replace-match}. @xref{Replacing Match}.
-@end defopt
+distinctions differently. When the search string contains only lower
+case letters, the search ignores case, but when the search string
+contains one or more upper case letters, the search becomes
+case-sensitive. But this has nothing to do with the searching
+functions used in Lisp code.
@defopt case-fold-search
This buffer-local variable determines whether searches should ignore
same as @code{(default-value 'case-fold-search)}.
@end defvar
+@defopt case-replace
+This variable determines whether the higher level replacement
+functions should preserve case. If the variable is @code{nil}, that
+means to use the replacement text verbatim. A non-@code{nil} value
+means to convert the case of the replacement text according to the
+text being replaced.
+
+This variable is used by passing it as an argument to the function
+@code{replace-match}. @xref{Replacing Match}.
+@end defopt
+
@node Regular Expressions
@section Regular Expressions
@cindex regular expression
@cindex regexp
- A @dfn{regular expression} (@dfn{regexp}, for short) is a pattern that
+ A @dfn{regular expression}, or @dfn{regexp} for short, is a pattern that
denotes a (possibly infinite) set of strings. Searching for matches for
a regexp is a very powerful operation. This section explains how to write
regexps; the following section says how to search for them.