るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.024秒)

別のキーワード

  1. << rexml::attribute#name
  2. add rexml::attribute#name
  3. handle_interrupt thread#raise
  4. service drb::extserv#stop_service
  5. inspect? irb::context#inspect_mode

キーワード

検索結果

MatchData#pre_match -> String (69010.0)

マッチした部分より前の文字列を返します($`と同じ)。

...マッチした部分より前の文字列を返します($`と同じ)。

//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.pre_match # => "foo"
//}

@see MatchData#post_match...

MatchData#post_match -> String (28.0)

マッチした部分より後ろの文字列を返します($'と同じ)。

...マッチした部分より後ろの文字列を返します($'と同じ)。

//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}

@see MatchData#pre_match...