るりまサーチ (Ruby 2.4.0)

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

別のキーワード

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

ライブラリ

検索結果

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

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

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

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

@see Regexp#match...