[racket] Locating substring with reserved characters

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Sat Sep 3 04:02:47 EDT 2011

Jukka Tuominen wrote at 09/03/2011 03:56 AM:
> I'm trying to locate a substring that I want to be treated just as a string
> rather than regexpr notation.

I think you want "regexp-quote".

(regexp (regexp-quote "5 (+ 1 2 3)"))
;;==> #rx"5 \\(\\+ 1 2 3\\)"

-- 
http://www.neilvandyke.org/


Posted on the users mailing list.