help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to re-search for ^"*Nanotechnology*"$


From: Daniel Jensen
Subject: Re: How to re-search for ^"*Nanotechnology*"$
Date: Wed, 05 Sep 2007 15:13:27 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

Mirko <mvukovic@nycap.rr.com> writes:

> My attempt
> (re-search-forward "\*[a-zA-Z ]+\*")
> fails.

Remember to use double backslashes in regexp string literals. The
backslash is an escape character in strings, so you need to use "\\" to
embed a backslash character in the string.

Or you could use rx, which provides a symbolic regexp syntax:

    (rx "*" (one-or-more (in alpha space)) "*")

Some find it easier to use.

> Also, if you could (please) show me how to use the [:alpha:]
> construct.

[[:alpha:]]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]