RE: [Perl-unix-users] Help Needed With a Regex

2005-11-17 Thread Thomas, Mark - BLS CTR
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

Re: [Perl-unix-users] Help Needed With a Regex

2005-11-16 Thread $Bill Luebkert
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