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
<[email protected]> 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
____________________
Racket Users list:
http://lists.racket-lang.org/users