????JFIF??x?x????'
| Server IP : 172.67.174.47  /  Your IP : 216.73.216.113 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././././proc/thread-self/root/opt/alt/ruby18/share/ri/1.8/system/String/ | 
| Upload File : | 
--- !ruby/object:RI::MethodDescription 
aliases: []
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Both forms iterate through <em>str</em>, matching the pattern (which may be a <tt>Regexp</tt> or a <tt>String</tt>). For each match, a result is generated and either added to the result array or passed to the block. If the pattern contains no groups, each individual result consists of the matched string, <tt>$&</tt>. If the pattern contains groups, each individual result is itself an array containing one entry per group.
- !ruby/struct:SM::Flow::VERB 
  body: "   a = "cruel world"\n   a.scan(/\\w+/)        #=> ["cruel", "world"]\n   a.scan(/.../)        #=> ["cru", "el ", "wor"]\n   a.scan(/(...)/)      #=> [["cru"], ["el "], ["wor"]]\n   a.scan(/(..)(..)/)   #=> [["cr", "ue"], ["l ", "wo"]]\n"
- !ruby/struct:SM::Flow::P 
  body: "And the block form:"
- !ruby/struct:SM::Flow::VERB 
  body: "   a.scan(/\\w+/) {|w| print "<<#{w}>> " }\n   print "\\n"\n   a.scan(/(.)(.)/) {|x,y| print y, x }\n   print "\\n"\n"
- !ruby/struct:SM::Flow::P 
  body: <em>produces:</em>
- !ruby/struct:SM::Flow::VERB 
  body: "   <<cruel>> <<world>>\n   rceu lowlr\n"
full_name: String#scan
is_singleton: false
name: scan
params: |
  str.scan(pattern)                         => array
  str.scan(pattern) {|match, ...| block }   => str
visibility: public