> 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.
http://www.gnu.org/software/emacs/manual/html_node/elisp/Regular-Expressions.html