Exemple:
C:\ruby>irb irb(main):008:0> line = "xxxRubyzzz" => "xxxRubyzzz" irb(main):009:0> line =~ /Ruby/ => 3 irb(main):011:0> $` => "xxx" irb(main):010:0> $' => "zzz"
Ruby (le langage de programmation) et Rails. (made in Toulouse)
C:\ruby>irb irb(main):008:0> line = "xxxRubyzzz" => "xxxRubyzzz" irb(main):009:0> line =~ /Ruby/ => 3 irb(main):011:0> $` => "xxx" irb(main):010:0> $' => "zzz"
Aucun commentaire:
Enregistrer un commentaire