From: Stephen Berman <Stephen.Berman@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: How to re-search for ^"*Nanotechnology*"$
Date: Wed, 05 Sep 2007 15:27:42 +0200 [thread overview]
Message-ID: <87ir6pp7ht.fsf@escher.local.home> (raw)
In-Reply-To: 1188995542.671074.138780@r34g2000hsd.googlegroups.com
On Wed, 05 Sep 2007 05:32:22 -0700 Mirko <mvukovic@nycap.rr.com> wrote:
> Hello,
>
> how does one write the regular expression search (in elisp) to look
> for
> ^"*Nanotechnology*"$
>
> (The string is inclosed by *'s and these are the only characters on
> the line.
>
> My attempt
> (re-search-forward "\*[a-zA-Z ]+\*")
> fails.
You need to escape the the backslashes for the Lisp reader to recognize
their use as an escape character in the regular expression:
(re-search-forward "^\\*[a-zA-Z ]+\\*$")
> Also, if you could (please) show me how to use the [:alpha:]
> construct.
(re-search-forward "^\\*[[:alpha:]]+\\*$")
Steve Berman
next prev parent reply other threads:[~2007-09-05 13:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 12:32 How to re-search for ^"*Nanotechnology*"$ Mirko
2007-09-05 13:02 ` Mirko
2007-09-05 13:13 ` Daniel Jensen
2007-09-05 13:18 ` Mirko
2007-09-05 13:27 ` Stephen Berman [this message]
2007-09-05 13:32 ` Eric Hanchrow
[not found] ` <mailman.366.1188999503.18990.help-gnu-emacs@gnu.org>
2007-09-05 15:27 ` Mirko
2007-09-05 21:41 ` Eric Hanchrow
[not found] ` <mailman.387.1189029199.18990.help-gnu-emacs@gnu.org>
2007-09-06 12:50 ` Mirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ir6pp7ht.fsf@escher.local.home \
--to=stephen.berman@gmx.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.