From: David Hansen <david.hansen@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: regexp-opt for all kinds of strings
Date: Thu, 19 Jul 2007 03:58:34 +0200 [thread overview]
Message-ID: <87ir8hw3w5.fsf@localhorst.mine.nu> (raw)
In-Reply-To: 1184775694.881034.197770@i38g2000prf.googlegroups.com
On Wed, 18 Jul 2007 09:21:34 -0700 Nordlöw wrote:
> Why aren't all kinds of characters allowed in regexp-opt()? I am doing
> syntax highlighting of operators in c-mode and would like regexp-opt
> to work for lists such:
> '("+" "-" "*" "/" "++" "--")
What's wrong with
ELISP> (regexp-opt '("+" "-" "*" "/" "++" "--"))
"\\+\\+\\|--\\|[*+/-]"
?
BTW "[-+*/>!]" should do the job.
David
next prev parent reply other threads:[~2007-07-19 1:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 16:21 regexp-opt for all kinds of strings Nordlöw
2007-07-19 1:58 ` David Hansen [this message]
2007-07-20 3:04 ` Tim X
-- strict thread matches above, loose matches on Subject: below --
2007-07-18 19:52 Nordlöw
2007-07-18 20:19 ` Stefan Monnier
2007-07-20 4:17 ` Tim X
2007-07-20 8:06 ` Nordlöw
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ir8hw3w5.fsf@localhorst.mine.nu \
--to=david.hansen@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).