in reply to Re^2: group things?
in thread group things?

As someone else already hinted, you would probably benefit from reading perlretut and pos.

It may seem like overkill for this problem but learning regular expressions will make string processing problems like this a lot easier. And almost all serious programming languages today have a regular expression library very much like perl's, so chances are high you'd be able to use that knowledge if you're using some other language too.

Replies are listed 'Best First'.
Re^4: group things?
by Anonymous Monk on Apr 25, 2008 at 22:39 UTC
    Oh, backreferences were the catch then? I saw about it in the tutorial... Thank you guys, both of you!