String-Read-Regex!

(string-read-regex! string regex flags) -> string or #f

Given a string, destructively match a regex against it. This is useful for iterative matching.

>> (define wr (make-regex "[a-z]+"))
:: [regex 547210]
>> (define str "alpha beta")
:: "alpha beta"
>> (string-read-regex! str wr)
:: "alpha"
>> (string-read-regex! str wr)
:: "beta"
>> (string-read-regex! str wr)
:: #f