in reply to Re^2: Find string matchin thread Find string match
my $tablename = ($str=~/\binto\s+([^\s]+)/)[0]; [download]
Less obscure:
$s = 'insert into table1 ( v1, v2 , v3) values ( v1, v2, v3)';; ( $tname ) = $s =~ m[into\s+(\S+)\s?\(]; print $tname;; table1 [download]