/usr/lib/ruby/vendor_ruby/client_side_validations/core_ext/regexp.rb is in ruby-client-side-validations 3.2.6+gh-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | class Regexp
def as_json(options = nil)
Regexp.new inspect.sub('\\A','^').sub('\\Z','$').sub('\\z','$').sub(/^\//,'').sub(/\/[a-z]*$/,'').gsub(/\(\?#.+\)/, '').gsub(/\(\?-\w+:/,'(').gsub(/\s/,''), self.options & 5
end
def to_json(options = nil)
as_json(options).inspect
end
def encode_json(encoder)
inspect
end
end
|