PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Regexp
U:RDoc::AnyMethod[iI" match:ETI"Regexp#match;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"7With no block given, returns the MatchData object ;TI"9that describes the match, if any, or +nil+ if none; ;TI"Cthe search begins at the given character +offset+ in +string+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"?/abra/.match('abracadabra') # => #<MatchData "abra"> ;TI"?/abra/.match('abracadabra', 4) # => #<MatchData "abra"> ;TI"//abra/.match('abracadabra', 8) # => nil ;TI"//abra/.match('abracadabra', 800) # => nil ;TI" ;TI"+string = "\u{5d0 5d1 5e8 5d0}cadabra" ;TI">/abra/.match(string, 7) #=> #<MatchData "abra"> ;TI"./abra/.match(string, 8) #=> nil ;TI">/abra/.match(string.b, 8) #=> #<MatchData "abra"> ;T:@format0o; ; [I"JWith a block given, calls the block if and only if a match is found; ;TI"returns the block's value:;T@o;; [ I"</abra/.match('abracadabra') {|matchdata| p matchdata } ;TI"# => #<MatchData "abra"> ;TI"?/abra/.match('abracadabra', 4) {|matchdata| p matchdata } ;TI"# => #<MatchData "abra"> ;TI"?/abra/.match('abracadabra', 8) {|matchdata| p matchdata } ;TI"# => nil ;TI"H/abra/.match('abracadabra', 8) {|marchdata| fail 'Cannot happen' } ;TI"# => nil ;T; 0o; ; [I".Output (from the first two blocks above):;T@o;; [ I"#<MatchData "abra"> ;TI"#<MatchData "abra"> ;TI" ;TI"+ /(.)(.)(.)/.match("abc")[2] # => "b" ;TI"* /(.)(.)/.match("abc", 1)[2] # => "c";T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"jmatch(string, offset = 0) -> matchdata or nil match(string, offset = 0) {|matchdata| ... } -> object ;T0[ I"(p1, p2 = v2);T@4FI"Regexp;TcRDoc::NormalClass00
[-] %3d%7e-i.ri
[edit]
[-] union-c.ri
[edit]
[-] try_convert-c.ri
[edit]
[-] to_s-i.ri
[edit]
[-] to_json-i.ri
[edit]
[-] as_json-i.ri
[edit]
[-] encoding-i.ri
[edit]
[-] source-i.ri
[edit]
[-] new-c.ri
[edit]
[-] match-i.ri
[edit]
[-] cdesc-Regexp.ri
[edit]
[-] json_create-c.ri
[edit]
[-] names-i.ri
[edit]
[-] fixed_encoding%3f-i.ri
[edit]
[-] hash-i.ri
[edit]
[-] match%3f-i.ri
[edit]
[-] %3d%3d%3d-i.ri
[edit]
[-] eql%3f-i.ri
[edit]
[+]
TimeoutError
[-] last_match-c.ri
[edit]
[-] linear_time%3f-c.ri
[edit]
[-] named_captures-i.ri
[edit]
[-] casefold%3f-i.ri
[edit]
[+]
..
[-] timeout-i.ri
[edit]
[-] escape-c.ri
[edit]
[-] quote-c.ri
[edit]
[-] %3d%3d-i.ri
[edit]
[-] timeout-c.ri
[edit]
[-] inspect-i.ri
[edit]
[-] %7e-i.ri
[edit]
[-] compile-c.ri
[edit]
[-] timeout%3d-c.ri
[edit]
[-] options-i.ri
[edit]