Sha256: dce0ce4c46db20ccc0f42be0685083974775a6eeea3160a1d27a5f252772efee
Contents?: true
Size: 325 Bytes
Versions: 14
Compression:
Stored size: 325 Bytes
Contents
# Matching (#{PATTERN}) will match "foo" or /foo/, and return a # regular expression. With quotes, the expression will be escaped. PATTERN = /[\"\/](?:\\.|[^\"\/\\])*[\"\/]/ Transform /^\/((?:\\.|[^\/\\])*)\/$/ do |rx| Regexp.new(rx) end Transform /^\"((?:\\.|[^\"\\])*)\"$/ do |str| Regexp.new(Regexp.quote(str)) end
Version data entries
14 entries across 14 versions & 1 rubygems