- match(other) -> MatchData | nil[permalink][rdoc][edit]
- 
正規表現 other とのマッチを行います。 (self.to_s.match(other) と同じです。) - [PARAM] other:
- 比較対象のシンボルを指定します。
- [RETURN]
- マッチが成功すれば MatchData オブジェクトを、そうでなければ nil を返します。
 p :foo.match(/foo/) # => #<MatchData "foo"> p :foobar.match(/bar/) # => #<MatchData "bar"> p :foo.match(/bar/) # => nil [SEE_ALSO] String#match [SEE_ALSO] Symbol#match?