U:RDoc::AnyMethod[iI"last_match:ETI"Regexp::last_match;TT: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"BThe first form returns the MatchData object generated by the ;TI"Nlast successful pattern match. Equivalent to reading the special global ;TI"Jvariable $~ (see Special global variables in Regexp for ;TI"details).;To:RDoc::Markup::BlankLineo; ; [I"LThe second form returns the nth field in this MatchData object. ;TI"@_n_ can be a string or symbol to reference a named capture.;T@o; ; [I"MNote that the last_match is local to the thread and method scope of the ;TI"'method that did the pattern match.;T@o:RDoc::Markup::Verbatim; [I"#/c(.)t/ =~ 'cat' #=> 0 ;TI":Regexp.last_match #=> # ;TI"'Regexp.last_match(0) #=> "cat" ;TI"%Regexp.last_match(1) #=> "a" ;TI"%Regexp.last_match(2) #=> nil ;TI" ;TI"4/(?\w+)\s*=\s*(?\w+)/ =~ "var = val" ;TI"NRegexp.last_match #=> # ;TI"'Regexp.last_match(:lhs) #=> "var" ;TI"&Regexp.last_match(:rhs) #=> "val";T: @format0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"QRegexp.last_match -> matchdata Regexp.last_match(n) -> str ;T0[I"(p1 = v1);T@&FI" Regexp;TcRDoc::NormalClass00