post_match -> String | nil[permalink][rdoc][edit]-
前回マッチを行った文字列のうち、マッチしたところよりも後ろの部分文字列を返します。前回のマッチが失敗していると常に nil を返します。
例require 'strscan' s = StringScanner.new('test string') p s.post_match # => nil p s.scan(/\w+/) # => "test" p s.post_match # => " string" p s.scan(/\w+/) # => nil p s.post_match # => nil p s.scan(/\s+/) # => " " p s.post_match # => "string" p s.scan(/\w+/) # => "string" p s.post_match # => "" p s.scan(/\w+/) # => nil p s.post_match # => nil