[Top][All Lists]

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

RE: How can I assign a regex to a variable?

From: Drew Adams
Subject: RE: How can I assign a regex to a variable?
Date: Thu, 28 Jul 2016 13:25:42 -0700 (PDT)

> Show a small but complete example that demonstrates the problem.
> Someone will be able to tell you what’s wrong with it.
> In Emacs, regexps are not special. They are just strings. If you
> assign a regexp string to a variable, you should be able to use that
> variable in all the ways you could use an actual regexp string.

What Yuri said.  My guess is that the error message was
telling you that the characters in the string you provided
do not comprise a valid regexp.  A regexp is represented
in Emacs Lisp by a string of characters, but not every
string of characters is a regular expression.

Consult the Elisp manual, starting a node `Regular Expressions',
for the syntax of an Elisp regexp.

reply via email to

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