[racket] Locating substring with reserved characters

From: Jukka Tuominen (jukka.tuominen at finndesign.fi)
Date: Sat Sep 3 03:56:18 EDT 2011

Hi all,

I'm trying to locate a substring that I want to be treated just as a string
rather than regexpr notation. The used strings are dynamic and there's no
control over their content. This is propably something simple, but I can't
seem to get it right.

Any ideas?


#lang racket

(regexp-match-positions* (pregexp "5 (+ 1 2 3)") "((named-lambda (plus x y)
(+ x y)) 5 (+ 1 2 3))")
;>> error: regexp: `+' follows nothing in pattern


br, jukka

|  J U K K A   T U O M I N E N
|  m a n a g i n g   d i r e c t o r  M. A.
|
|  Finndesign  Kauppiaankatu 13, FI-00160 Helsinki, Finland
|  mobile +358 50 5666290
|  jukka.tuominen at finndesign.fi  www.finndesign.fi




Posted on the users mailing list.