Since this may require recursion (as you say the values may be key/value
pairs themselves), you'll need something a bit more powerful than a
regex. I suggest looking into Text::Balanced, which can do what you
want.
Here's sample code to get you started. It does the first step of
extracting the out
Darryl Ross wrote:
> Hey All,
>
> I have a string that looks like this:
>
> {key1,val1},{key2,val2},{key3,val3},{key4,val4},{key5,val5},...
>
> I'm trying to write a regular expression which can split up that string
> and give me a hash back. There are a few gotchas though:
>
> - The key a