るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. kernel $-i

ライブラリ

クラス

検索結果

StringScanner#post_match -> String | nil (24343.0)

前回マッチを行った文字列のうち、マッチしたところよりも後ろの 部分文字列を返します。前回のマッチが失敗していると常に nil を 返します。

...il を
返します。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
s.post_match # => nil
s.scan(/\w+/) # => "test"
s.post_match # => " string"
s.scan(/\w+/) # => nil
s.post_match # => nil
s.scan(/\s+/) # => " "
s.post_match # => "string"
s.scan(/\w+/) # => "stri...
...ng"
s.post_match # => ""
s.scan(/\w+/) # => nil
s.post_match # => nil
//}...