--- use strict; use Text::Balanced qw(extract_bracketed); my $text = '{\f2\fs20 Da biste }{\cs6\f1\cf6\lang \{#}RES_ID{\cs6\f1\cf6\lang #\}} odaberite'; my($extracted, $remainder) = extract_bracketed($text,'{}'); print "$extracted\n$remainder\n"; print(($extracted =~ /^{.*?\s(.*)\s}$/)); ---
{\f2\fs20 Da biste } {\cs6\f1\cf6\lang \{#}RES_ID{\cs6\f1\cf6\lang #\}} odaberite Da biste If there are multiple \fs2 things on a line, you should be able to loop through either $extracted or $remainder to find then and extract the string. - Ron _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs