Hi Reuben, > > Why can't you instead add \ escaping to all existing regex meta-characters > > that occur in the string, at which point you get the same effect without a > > new flag? > > Because that is error-prone (in particular, I would have to take the > current syntax into account).
Error-prone? No, it's a function which transforms a string to a string. I'm sure this function has been implemented many times already. The one I wrote is called 'regexp-quote' [1][2]. > In the meantime is there any better way to use this for myself than > simply maintaining a variant version of GNU regex? e.g. some way of > maintaining a patch against gnulib... Yes, you can maintain patches against gnulib, see the gnulib documentation [3]. But in this case I think you'll have more work maintaining this patch in the long run than with a string -> regex function like the one Eric suggested. Bruno [1] http://clisp.cons.org/impnotes/regexp-mod.html#ex-re-quote [2] http://clisp.cvs.sourceforge.net/viewvc/clisp/clisp/modules/regexp/regexp.lisp?revision=1.29&content-type=text%2Fplain [3] http://www.gnu.org/software/gnulib/manual/html_node/Extending-Gnulib.html