るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.020秒)
トップページ > クラス:MatchData[x] > クエリ:MatchData#post_match[x]

別のキーワード

  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#post_match -> String (23001.0)

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

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

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

@see MatchData#pre_match...

MatchData#pre_match -> String (7.0)

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

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

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

@see MatchData#post_match...