るりまサーチ

最速Rubyリファレンスマニュアル検索!
8件ヒット [1-8件を表示] (0.015秒)
トップページ > クラス:Regexp[x] > クエリ:match[x] > クエリ:match?[x]

別のキーワード

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

ライブラリ

検索結果

Regexp#match?(str, pos = 0) -> bool (24226.0)

指定された文字列 str に対して 位置 pos から自身が表す正規表現によるマッチングを行います。 マッチした場合 true を返し、マッチしない場合には false を返します。 また、$~ などパターンマッチに関する組み込み変数の値は変更されません。

...ます。
また、$~ などパターンマッチに関する組み込み変数の値は変更されません。

//emlist[例][ruby]{
/R.../.match?("Ruby") # => true
/R.../.match?("Ruby", 1) # => false
/P.../.match?("Ruby") # => false
$& # => nil
//}

@see Regexp#match...