That's it, thanks! #lang racket
(regexp-match-positions* (regexp-quote "5 (+ 1 2 3)") "((named-lambda (plus x y) (+ x y)) 5 (+ 1 2 3))") ;>> '((35 . 46)) br, jukka > -----Original Message----- > From: Neil Van Dyke [mailto:n...@neilvandyke.org] > Sent: 03 September 2011 11:03 > To: Jukka Tuominen > Cc: users@racket-lang.org > Subject: Re: [racket] Locating substring with reserved characters > > > 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/ _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users