in reply to Re^2: Pattern Matching - a Tricky one
in thread Pattern Matching - a Tricky one

Ah, good call on the infinite loop. Sometimes I forget that you can't trust your input.

There's a bit more I could have done with this, such as detecting/capturing whether I was in a credit or a debit section, as that would presumably be good to know. But, this has the basics at least.