[racket] Rosetta code submission / string operations

From: Tobias Hammer (tobias.hammer at dlr.de)
Date: Tue Jun 4 09:34:34 EDT 2013

Sorry for the misinformation but Eli is of course right that regexp-quote  
must be used.

Example:

(regexp-match? "a" "abc")
> #t
(regexp-match? "." "abc")
> #t  ; WRONG! '.' matches every character

(regexp-match? (regexp-quote "a") "abc")
> #t
(regexp-match? (regexp-quote ".") "abc")
> #f


On Tue, 04 Jun 2013 13:57:41 +0200, Daniel Prager  
<daniel.a.prager at gmail.com> wrote:

> Thanks Tobias & Eli
>
> I've updated my submission to use (regexp-match? sub-str str).
>
> [Also added the stretch goal solution, but could do with some refactoring
> to reduce the joint line-count.]
>
> -- Dan

Posted on the users mailing list.