Here is one attempt:
$_ = 'mykey {{ abc xyz nnn mmm }} mykey2 {{ aaa bbb ccc ddd}}';
my @MyData = ();
while ( /\{{2}([a-z0-9\s]+)\}{2}/g ) {
push(@MyData, $1);
}
my $MyId = 1;
foreach ( @MyData ) {
printf "%3d: %s\n", $MyId++, $_;
}
Output:
1: abc xyz nnn mmm
2: aaa bbb ccc ddd
Wags ;)
-----Original Message-----
From: Bhanu Prakash [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 21:38
To: [EMAIL PROTECTED]
Subject: [Q] Convert tcl list
Hi All,
I have a list tcl list dumped onto a data file
which looks like
mykey {{ abc xyz nnn mmm }} mykey2 {{ aaa bbb ccc ddd
}}....,.....
I want to extract the information in the flower braces
and put it into another data file. How easy / or
difficult to implement this in perl? Can somebody help
me accomplish this?
I know I can do this using regular expressions.! But
, I'm bad at regexps!!
Thanks for the help
Bhanu.
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]