HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/String/scan-i.ri
U:RDoc::AnyMethod[iI"	scan:ETI"String#scan;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"QBoth forms iterate through <i>str</i>, matching the pattern (which may be a ;TI"6Regexp or a String). For each match, a result is ;TI"Ogenerated and either added to the result array or passed to the block. If ;TI"Lthe pattern contains no groups, each individual result consists of the ;TI"Lmatched string, <code>$&</code>.  If the pattern contains groups, each ;TI"Iindividual result is itself an array containing one entry per group.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;	[
I"a = "cruel world"
;TI"1a.scan(/\w+/)        #=> ["cruel", "world"]
;TI"4a.scan(/.../)        #=> ["cru", "el ", "wor"]
;TI":a.scan(/(...)/)      #=> [["cru"], ["el "], ["wor"]]
;TI";a.scan(/(..)(..)/)   #=> [["cr", "ue"], ["l ", "wo"]]
;T:@format0o;
;	[I"And the block form:;T@o;;	[	I",a.scan(/\w+/) {|w| print "<<#{w}>> " }
;TI"print "\n"
;TI"*a.scan(/(.)(.)/) {|x,y| print y, x }
;TI"print "\n"
;T;
0o;
;	[I"<em>produces:</em>;T@o;;	[I"<<cruel>> <<world>>
;TI"rceu lowlr;T;
0:
@fileI"
string.c;T:0@omit_headings_from_table_of_contents_below0I"istr.scan(pattern)                         -> array
str.scan(pattern) {|match, ...| block }   -> str
;T0[I"	(p1);T@+FI"String;TcRDoc::NormalClass00