when Regexp
# Remove captures and the ^ and $ that are sometimes placed in requirement regexps
sub = has_req.remove_captures.source.sub(/^\^/,'').sub(/\$$/,'')
when Regexp
# Remove captures and the ^ and $ that are sometimes placed in requirement regexps
sub = has_req.remove_captures.source.sub(/^\^/,'').sub(/\$$/,'')