in reply to regular expression to get the tablename.column_name
Or condensed to uglier form:$/ = undef or $data = <> and $data =~ s{ ^TABLE;([^;\n]+).*$ | ^COLUMN;(.+?);.*$ }{$1 ? (($t=$1),"") : "$t.$2"}mexg; print $data;
Update - golfedperl -e '$/=undef or $_=<> and s{^TABLE;([^;\n]+).*$|^COLUMN;(.+?);.*$ +}{$1?(($t=$1),""):"$t.$2"}mexg and print;' data.txt
Wait.. was this in the SoPW or obfu section? :)perl -e'local$/or$_=<>,s{^TABLE;(.+?)$|^COLUMN;(.+?);.*$}{$1?(($t=$1), +""):"$t.$2"}mexg and print;' data.txt
|
|---|