Sha256: 6fc235976d6e48ed3746c6e2d6ace6d4612bc318c8c52321b84b72ef02ff17b9
Contents?: true
Size: 511 Bytes
Versions: 26
Compression:
Stored size: 511 Bytes
Contents
class MatchData # Return the primary match string. This is equivalent to +md[0]+. # # md = /123/.match "123456" # md.match #=> "123" # def match self[0] end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TC_MatchData < Test::Unit::TestCase # match def test_match md = /X(a)(b)(c)X/.match("YXabcXY") assert_equal( "XabcX", md.match ) end end =end
Version data entries
26 entries across 26 versions & 1 rubygems