るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.072秒)
トップページ > クエリ:String[x] > クエリ:h[x] > クエリ:os[x] > バージョン:3.2[x] > クラス:StringScanner[x] > クエリ:post_match[x]

別のキーワード

  1. zlib os_code
  2. zlib os_os2
  3. zlib os_macos
  4. zlib os_atari
  5. zlib os_msdos

ライブラリ

検索結果

StringScanner#post_match -> String | nil (100390.0)

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

...字列を返します。前回のマッチが失敗していると常に nil を
返します。

//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...