[racket] Destructuring-bind for Regex

From: Galler (lzgaller at optonline.net)
Date: Fri Jan 4 14:50:43 EST 2013

Hello,

Is there a destructuring-bind for regular expressions?

Something along the lines of the purely fictional function 
"with-destructuring-regex", below:

(with-destructuring-regex ([(list #px"[\\D]*"  #px"[\\d]+\\.[\\d]+" 
#px"[\\D]*") "This is a 40.2 Song about Japan" (x y z)])
                          (values x y z))

;->
;"This is a "
;"40.2"
;"Song about Japan"

This seems very much like something Danny would have implemented at some 
point in time.

  If the answer is no, I'll just go ahead and code it and share results, 
if of interest.

Thanks much.

Zack

Posted on the users mailing list.