Generate matching strings from a given regex