Website hosting service by Active-Venture.com
 

 Back to Index

prev - up - next - index

MatchingData

The status of the regular expression match. The value of the variable $~ is the instance of this class.

SuperClass:

Object

Methods:

size
length

Returns the number of the subpatterns (i.e. $~.to_a.size).

offset(n)

Returns the offsets ([start, end]) of the nth subpattern. 0 means the whole match.

begin(n)

Returns the starting offset of the nth match. 0 means the whole match.

end(n)

Returns the end offset of the nth match. 0 means the whole match.

to_a

Returns the array of the subpatterns, which is [$&, $1, $2,...].

self[n]

Returns the nth subpattern.

pre_match

Returns the string preceding the match (i.e. $`).

post_match

Returns the string following the match (i.e. $').

string

Returns the string where the match was performed.


prev - up - next - index

matz@netlab.co.jp

 

  

 

 

2002-2004 Active-Venture.com Website Hosting Service

 
Buy domain name at only $5.95/yr with comprehensive domain hosting services. Domain registration and domain search service from $5.95 Cheap domain name registration and domain transfer service
 

Disclaimer: This documentation is provided only for the benefits of our website hosting customers.
For authoritative source of the documentation, please refer to http://www.ruby-doc.org/docs/