るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.147秒)
トップページ > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:-[x] > クエリ:r[x] > クラス:StringScanner[x] > クエリ:string[x] > クエリ:post_match[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. etc sc_getgr_r_size_max
  5. etc sc_getpw_r_size_max

ライブラリ

検索結果

StringScanner#post_match -> String | nil (24470.0)

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

...mlist[例][ruby]{
r
equire '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+/) # => "string"
s.post_match # => ""
s...
....scan(/\w+/) # => nil
s.post_match # => nil
//}...