Phrogz
12/1/2007 7:02:00 AM
On Nov 30, 11:05 pm, Martin Durai <mar...@angleritech.com> wrote:
> I have created a buffer class and i was able to read a character, string
> and write in the buffer. Iam in process of creating pull parser. Now iam
> parsing only with strings. if i give a string
> "<abc>defgh</abc><def>ijk</def>" as a string input i need to check the
> starting of tag and end of tag. could any one help me to do tag_start
> and tag_end method.
Check out String#scan method with regexp %r{</?\S>} and StringScanner
class (require 'strscan').