fork(1) download
  1. r = /\$(?<dollars>\d+)\.(?<cents>\d+)/
  2. s = '$3.67'
  3.  
  4. if r =~ s then
  5. puts dollars
  6. puts cents
  7. end
  8.  
Runtime error #stdin #stdout #stderr 0.01s 5776KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.rb:5:in `<main>': undefined local variable or method `dollars' for main:Object (NameError)