Yes, you're building a hash of hashes of hashes (HoHoH).
But please show an actual data sample (between <code> and </code> tags), because I cannot make any sense of your regex compared to your description of the input data.
Comment on Re: Parsing a file and storing the data