method

begin

v1_8_6_287 - Show latest stable - Class: MatchData
begin(p1)
public

Returns the offset of the start of the nth element of the match array in the string.

   m = /(.)(.)(\d+)(\d)/.match("THX1138.")
   m.begin(0)   #=> 1
   m.begin(2)   #=> 2