in reply to Re: regular expression to get the tablename.column_name
in thread regular expression to get the tablename.column_name

perl -F/;/ -lane "/TABLE;(.+)/ and $t=$1 or print qq($t.$F[1])" o33.tx +t
Oops !! still I did not get the prompt. keeps on running

Replies are listed 'Best First'.
Re^3: regular expression to get the tablename.column_name
by ikegami (Patriarch) on Oct 18, 2006 at 04:14 UTC
    Unlike the OP's version, your version won't handle blank lines or lines other than TABLE and COLUMN properly. If that's acceptable, then the following is even shorter:
    perl -nle "/TABLE;(.*)/?($t=$1):/;(.*);/&&print qq($t.$1)" o33.txt