ruby - Return match position in String.scan -
i need scan larger text documents patterns expressed in regular expressions , extract number of surrounding text tokens. @ moment use string.scan retrieve matches, doesn't give me position of matched string in document. there elegant solution this?
check out post.
it works on match object. m.begin(1)
Comments
Post a Comment