Update: Ah, I see, then look at grab only if pattern matches previous line, there are a bunch of solutions to your problem.
I really don't understand, what you're trying to do, but for what I understand, the follwing should work (untested, I simply assume you want capturing parenthesis in your regexp):
my $test = ";Town ; London;"; if ($test =~ /Town ;([^;]+);/) { print $1; # $1 contains 'London ' }
regards,
tomte
An intellectual is someone whose mind watches itself.
-- Albert Camus
In reply to Re: HTML Formattting
by Tomte
in thread HTML Formattting
by minixman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |