in reply to Perl starter with big problem.
For future reference, you may wish to bookmark Re^3: My Favourite Regex Tools (Was: Parsing a Variable Format String).
HTH,