monks

create table "metrica".vodafone_capacity_cell_count_week ( nc_id integer, cell_id varchar(50) not null , week_of integer not null , busy_hour "informix".utime, gsm_tch_cong_pc_range_1 integer, gsm_tch_cong_pc_range_2 integer, gsm_tch_cong_pc_range_3 integer, gsm_sdcch_cong_pc_range_1 integer, gsm_sdcch_cong_pc_range_2 integer, gsm_sdcch_cong_pc_range_3 integer, gsm_sdcch_cong_pc_range_4 integer, gsm_hr_tch_util_pc_range_1 integer, gsm_hr_tch_util_pc_range_2 integer, gsm_hr_tch_util_pc_range_3 integer, gsm_hr_tch_util_pc_range_4 integer, gsm_hr_tch_util_pc_range_5 integer, gprs_cong_pc_range_1 integer, gprs_cong_pc_range_2 integer, gprs_cong_pc_range_3 integer, config_tch integer, config_fpdch integer, config_trx integer, config_layer integer, cell_type varchar(25) default null );
From the above input I would like to take table_name.column_name format output. but default null is not the column name. keeping that in mind I would like to get a regex to do this. I have written a perl code which comes for 20 lines. to do the above task. But I would like to get the better solution.
The out put should be as follows
vodafone_capacity_cell_count_week vodafone_capacity_cell_count_week.nc_id vodafone_capacity_cell_count_week.cell_id vodafone_capacity_cell_count_week.week_of vodafone_capacity_cell_count_week.busy_hour vodafone_capacity_cell_count_week.gsm_tch_cong_pc_range_1 vodafone_capacity_cell_count_week.gsm_tch_cong_pc_range_2 vodafone_capacity_cell_count_week.gsm_tch_cong_pc_range_3 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_1 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_2 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_3 vodafone_capacity_cell_count_week.gsm_sdcch_cong_pc_range_4 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_1 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_2 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_3 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_4 vodafone_capacity_cell_count_week.gsm_hr_tch_util_pc_range_5 vodafone_capacity_cell_count_week.gprs_cong_pc_range_1 vodafone_capacity_cell_count_week.gprs_cong_pc_range_2 vodafone_capacity_cell_count_week.gprs_cong_pc_range_3 vodafone_capacity_cell_count_week.config_tch vodafone_capacity_cell_count_week.config_fpdch vodafone_capacity_cell_count_week.config_trx vodafone_capacity_cell_count_week.config_layer vodafone_capacity_cell_count_week.cell_type
Above output is from my script.

In reply to removing unwanted lines from the pattern match by greatshots

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.