in reply to Oft encountered regex problem

Herman,
I started to reply to this node about 3 times and stopped. Are you going to be creating a bunch of hashes that hold a single record or would you like an Array of Hashes that hold all the records?

In any case - what you are going to want to do is figure out how to split your data into key and value pieces. You have three things to split on - ": ", " is ", and " at". You are going to want to limit the split to just two pieces since the rest of the string may duplicate the delimiter.

my ($key, $val) = split /(: | is | and )/ , $_, 2; $info{$key} = $val;
This has some problems. You are assuming you will not encounter the same key name twice in the same data file - that would overwrite the first one. You are also not building the hash with a single regex like you asked, but iterating over the data splitting each line into two pieces.

It seems to me that if you were processing a lot of these types of records at once you would want to use an AoH.

If you can give a little bit more context of what you are trying to accomplish, I would be glad to help further.

Cheers - L~R