Module: RE2::String Deprecated

Defined in:
lib/re2/string.rb

Overview

Deprecated.

Use methods on RE2 and Regexp instead.

Instance Method Summary collapse

Instance Method Details

#re2_escapeObject Also known as: re2_quote

Deprecated.

Use RE2.QuoteMeta instead.



32
33
34
# File 'lib/re2/string.rb', line 32

def re2_escape
  RE2.QuoteMeta(self)
end

#re2_gsub(*args) ⇒ Object

Deprecated.

Use RE2.GlobalReplace instead.



22
23
24
# File 'lib/re2/string.rb', line 22

def re2_gsub(*args)
  RE2.GlobalReplace(self, *args)
end

#re2_match(pattern, *args) ⇒ Object

Deprecated.

Use Regexp#match instead.



27
28
29
# File 'lib/re2/string.rb', line 27

def re2_match(pattern, *args)
  RE2::Regexp.new(pattern).match(self, *args)
end

#re2_sub(*args) ⇒ Object

Deprecated.

Use RE2.Replace instead.



17
18
19
# File 'lib/re2/string.rb', line 17

def re2_sub(*args)
  RE2.Replace(self, *args)
end