|
From: | David Hansen |
Subject: | Re: regexp-opt for all kinds of strings |
Date: | Thu, 19 Jul 2007 03:58:34 +0200 |
User-agent: | Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |