Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ruby / usr / share / ri / 2.2.0 / system / Regexp / %3d%7e-i.ri
Size: Mime:
U:RDoc::AnyMethod[iI"=~:ETI"Regexp#=~;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"3Match---Matches <i>rxp</i> against <i>str</i>.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;	[I""/at/ =~ "input data"   #=> 7
;TI"$/ax/ =~ "input data"   #=> nil
;T:@format0o;
;	[I"KIf <code>=~</code> is used with a regexp literal with named captures, ;TI"Gcaptured strings (or nil) is assigned to local variables named by ;TI"the capture names.;T@o;;	[I"4/(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ "  x = y  "
;TI"p lhs    #=> "x"
;TI"p rhs    #=> "y"
;T;
0o;
;	[I"=If it is not matched, nil is assigned for the variables.;T@o;;	[I"1/(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ "  x = "
;TI"p lhs    #=> nil
;TI"p rhs    #=> nil
;T;
0o;
;	[I"8This assignment is implemented in the Ruby parser. ;TI"KThe parser detects 'regexp-literal =~ expression' for the assignment. ;TI"UThe regexp must be a literal without interpolation and placed at left hand side.;T@o;
;	[I"BThe assignment does not occur if the regexp is not a literal.;T@o;;	[	I"*re = /(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/
;TI"re =~ "  x = y  "
;TI")p lhs    # undefined local variable
;TI")p rhs    # undefined local variable
;T;
0o;
;	[I"=A regexp interpolation, <code>#{}</code>, also disables ;TI"the assignment.;T@o;;	[I"rhs_pat = /(?<rhs>\w+)/
;TI"//(?<lhs>\w+)\s*=\s*#{rhs_pat}/ =~ "x = y"
;TI")p lhs    # undefined local variable
;T;
0o;
;	[I"RThe assignment does not occur if the regexp is placed at the right hand side.;T@o;;	[I"4"  x = y  " =~ /(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/
;TI"*p lhs, rhs # undefined local variable;T;
0:
@fileI"	re.c;T:0@omit_headings_from_table_of_contents_below0I"%rxp =~ str    -> integer or nil
;T0[I"	(p1);T@CFI"Regexp;TcRDoc::NormalClass00