tags:

views:

19

answers:

1

search for filename . "myfile.txt"

(regexp-quote "filename \. \"\\(.+\\)\"")
"filename \\. \"\\\\(\\.\\+\\\\)\""

search for filename . "myfile.txt (without last quote)

(regexp-quote "filename \. \"\\(.+\\)")
Debugger entered--Lisp error: (invalid-read-syntax ") or . in a vector")
  read(#<buffer processing-files.el>)
  preceding-sexp()
  eval-last-sexp-1(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  call-interactively(eval-print-last-sexp nil nil)
A: 

I think that you misunderstood what regexp-quote mean:

From the doc (C-h C-f regexp-quote RET)

Return a regexp string which matches exactly string and nothing else.

Or I misunderstood your question.

Anyway if you want to search there is some function search-backward-regexp, search-forward-regexp

mathk