Alexandru Popescu wrote:

> Thanks for all suggestions, but the requirement is to be done thru
> regex only :-). I knew how to do it with split, but I need to do it
> with regexps only.

That seems to be splitting hairs (no pun intended), since "split" uses
regular expressions to split with.

-- 
Paul Lutus
http://www.arachnoid.com