るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.114秒)
トップページ > クエリ:t[x] > クエリ:String[x] > 種類:インスタンスメソッド[x] > クエリ:puts[x] > クラス:MatchData[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

検索結果

MatchData#inspect -> String (6227.0)

self の内容を人間に読みやすい文字列にして返します。

...ist[例][ruby]{
puts
/.$/.match("foo").inspect
# => #<MatchData "o">

puts
/(.)(.)(.)/.match("foo").inspect
# => #<MatchData "foo" 1:"f" 2:"o" 3:"o">

puts
/(.)(.)?(.)/.match("fo").inspect
# => #<MatchData "fo" 1:"f" 2:nil 3:"o">

puts
/(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").inspect
# => #<Match...
...Data "hog" foo:"h" bar:"o" baz:"g">
//}...