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

Version Path
facets-0.9.0 lib/nano/matchdata/match.rb
facets-1.0.3 packages/core/lib/facet/matchdata/match.rb
facets-1.0.0 lib/facet/matchdata/match.rb
facets-1.3.0 lib/facets/core/matchdata/match.rb
facets-1.1.0 lib/facet/matchdata/match.rb
facets-1.2.0 lib/facets/core/matchdata/match.rb
facets-1.2.1 lib/facets/core/matchdata/match.rb
facets-1.3.1 lib/facets/core/matchdata/match.rb
facets-1.3.2 lib/facets/core/matchdata/match.rb
facets-1.3.3 lib/facets/core/matchdata/match.rb
facets-1.4.2 lib/facets/core/matchdata/match.rb
facets-1.4.0 lib/facets/core/matchdata/match.rb
facets-1.4.1 lib/facets/core/matchdata/match.rb
facets-1.4.3 lib/facets/core/matchdata/match.rb
facets-1.4.4 lib/facets/core/matchdata/match.rb
facets-1.4.5 lib/facets/core/matchdata/match.rb
facets-1.7.38 lib/facets/core/matchdata/match.rb
facets-1.7.0 lib/facets/core/matchdata/match.rb
facets-1.7.30 lib/facets/core/matchdata/match.rb
facets-1.7.46 lib/facets/core/matchdata/match.rb