るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.023秒)
トップページ > バージョン:2.6.0[x] > クエリ:Regexp[x] > クエリ:match[x] > ライブラリ:strscan[x] > クエリ:scan_full[x]

別のキーワード

  1. _builtin match
  2. _builtin match?
  3. regexp match
  4. regexp last_match
  5. string match

クラス

検索結果

StringScanner#scan_full(regexp, s, f) -> object (54949.0)

スキャンポインタの位置から regexp と文字列のマッチを試します。

...部分文字列を返します。
false ならばマッチした部分文字列の長さを返します。

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

s = StringScanner.new('test string')
p s.scan_full(/\w+/, true, true) #=> "test"
p s.scan_full(/\s+/, false, true) #=> " "
p s.scan_full...