るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.084秒)

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n=
  3. rsa n
  4. openssl n
  5. openssl n=

クラス

検索結果

StringScanner#[](nth) -> String | nil (63610.0)

前回マッチした正規表現の nth 番目のかっこに対応する部分文字列を 返します。インデックス 0 はマッチした部分全体です。前回のマッチが 失敗していると常に nil を返します。

...マッチした正規表現の nth 番目のかっこに対応する部分文字列を
返します。


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

s = StringScanner.new('test string')
s.scan(/\w(\w)(\w*)/) # => "test"
s[0] # => "test"
s[1] # => "e"
s[2]...