match(other) -> Integer | nil[permalink][rdoc]-
正規表現 other とのマッチを行います。
(self.to_s.match(other) と同じです。)
- [PARAM] other:
- 比較対象のシンボルを指定します。
- [RETURN]
- マッチが成功すればマッチした位置を、そうでなければ nil を返します。
p :foo.match(/foo/) # => 0 p :foobar.match(/bar/) # => 3 p :foo.match(/bar/) # => nil
[SEE_ALSO] String#match