PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Regexp
U:RDoc::AnyMethod[iI"=~:ETI"Regexp#=~;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"BReturns the integer index (in characters) of the first match ;TI"0for +self+ and +string+, or +nil+ if none; ;TI"also sets the ;TI"J{rdoc-ref:Regexp global variables}[rdoc-ref:Regexp@Global+Variables]:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"!/at/ =~ 'input data' # => 7 ;TI"1$~ # => #<MatchData "at"> ;TI"#/ax/ =~ 'input data' # => nil ;TI"#$~ # => nil ;T:@format0o; ; [I"AAssigns named captures to local variables of the same names ;TI"if and only if +self+:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"Is a regexp literal; ;TI"Jsee {Regexp Literals}[rdoc-ref:syntax/literals.rdoc@Regexp+Literals].;To;;0; [o; ; [I"&Does not contain interpolations; ;TI"Dsee {Regexp interpolation}[rdoc-ref:Regexp@Interpolation+Mode].;To;;0; [o; ; [I"&Is at the left of the expression.;T@o; ; [I" Example:;T@o;; [I"4/(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ ' x = y ' ;TI"p lhs # => "x" ;TI"p rhs # => "y" ;T; 0o; ; [I""Assigns +nil+ if not matched:;T@o;; [I"1/(?<lhs>\w+)\s*=\s*(?<rhs>\w+)/ =~ ' x = ' ;TI"p lhs # => nil ;TI"p rhs # => nil ;T; 0o; ; [I"PDoes not make local variable assignments if +self+ is not a regexp literal:;T@o;; [ I")r = /(?<foo>\w+)\s*=\s*(?<foo>\w+)/ ;TI"r =~ ' x = y ' ;TI"&p foo # Undefined local variable ;TI"&p bar # Undefined local variable ;T; 0o; ; [I"DThe assignment does not occur if the regexp is not at the left:;T@o;; [I"4' x = y ' =~ /(?<foo>\w+)\s*=\s*(?<foo>\w+)/ ;TI",p foo, foo # Undefined local variables ;T; 0o; ; [I"9A regexp interpolation, <tt>#{}</tt>, also disables ;TI"the assignment:;T@o;; [I"r = /(?<foo>\w+)/ ;TI")/(?<foo>\w+)\s*=\s*#{r}/ =~ 'x = y' ;TI"%p foo # Undefined local variable;T; 0: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"(regexp =~ string -> integer or nil ;T0[ I" (p1);T@XFI"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]