On Sat, Jul 22, 2017 at 3:30 PM, David Storrs <david.sto...@gmail.com> wrote:
>
> Alternatively, if 'match' made the results of a successful regexp test
> available to the bodies on the RHS then you could do the same thing by
> accessing the result list.  Perhaps if match would allow the RHS to be a
> function?
>
> (match "foo"
>   [#px"oo.+(.)" (lambda (res) (println (~a "Regexp match results were: "
> res)))])
>
> Output:
> '("oobar" "r")
>

This, at least, already exists:

(match "foobar"
  [(pregexp #px"oo.+(.)" res)
   (println (~a "Regexp match results were: " res))])

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to