On 10/02/2012 10:32 AM, ajay paswan wrote:
> How to sparse a string like:
>
> suppose input is str="<a>1</a><a>22</a><a>3</a>"
> I want str_a=["<a>1</a>","<a>22</a>","<a>3</a>"]
> How can I get str_a from str?
>
1.9.3p125 :002 > str.scan /<a>\d+<\/a>/
  => ["<a>1</a>", "<a>22</a>", "<a>3</a>"]

Sam