Writing a regex in LaTeX
Perhaps the problem is that some of those commands (\backslash, \grave) want to be in math mode, but \" doesn't. Have you tried using \verb to include the regexp verbatim? I'm not sure if it'll look like you want (it'll be typeset in a tt font), but you could do this with something like:
...
In my project I'm using a regexp \verb@^\"((\w|\s)+)\"@ to do a thing.
...
Use \verb/^\"((\w|\s)+)\"$/