関連するキーワード
ライブラリ
- ビルトイン (4)
検索結果
-
Symbol
# =~(other) -> Integer | nil (18125) -
正規表現 other とのマッチを行います。
....to_s =~ other と同じです。)
@param other 比較対象のシンボルを指定します。
@return マッチが成功すればマッチした位置のインデックスを、そうでなければ nil を返します。
p :foo =~ /foo/ # => 0
p :foobar =~ /bar/ # => 3
p :foo =~ /bar....../ # => nil
@see String#=~, String#match... -
Symbol
# match(other) -> Integer | nil (3025) -
正規表現 other とのマッチを行います。
....to_s =~ other と同じです。)
@param other 比較対象のシンボルを指定します。
@return マッチが成功すればマッチした位置のインデックスを、そうでなければ nil を返します。
p :foo =~ /foo/ # => 0
p :foobar =~ /bar/ # => 3
p :foo =~ /bar....../ # => nil
@see String#=~, String#match...
