At 8:15 PM -0600 1/26/11, Greg J wrote:
I am trying to extract numeric values from a data file and I'm having trouble writing a regular expression that would do this.My data looks like this: <{5, 26}{20, 42, 64}{23, 48}> I am trying to turn this into a list of lists [ [5, 26], [20, 42, 64], [23,48] ] Any pointers would be greatly appreciated
I would use the Text::Balanced module to extract the characters between braces and the split function to extract the numbers separated by commas.
perldoc Text::Balanced perldoc -f split -- Jim Gibson [email protected] -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
