in reply to Re^9: Converting Oracle report language code into perl
in thread Converting Oracle report language code into perl
and I am getting the output like this$ARGV[0] .= ".rpt"; open(FH,"<$ARGV[0]") or die "Cant open"; @arr = <FH>; close(FH); foreach $data(@arr){ if($data =~ /^\.define/ .. /^\.\.\.define$/){ $data =~ s/(^\.\w+\s+)(\w+)(\s+)(.+\w+$)(\s+\. \.$)/$2,$4/smx; print "$data \n"; } }
u can see I am not able to capture the data between .define and .. properly using the regex..PLease help me out.define lok_tabs lock tab book_tab, book_mat, custdata2, ed_tab, book_rates, print_tab in share update mode .. .define get_input select key, key1, key2, key3, key4, print_name into input_book_seq, fax_head, file_num, in_print_rates, NotId, print_name from ed_table where ed_table.tag = 'BOOK' and ed_table.key = 'PRNT' and ed_table.user_id = user ..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Converting Oracle report language code into perl
by BrowserUk (Patriarch) on Jun 27, 2007 at 13:00 UTC | |
by denzil_cactus (Sexton) on Jun 27, 2007 at 13:06 UTC | |
by BrowserUk (Patriarch) on Jun 27, 2007 at 13:28 UTC | |
by denzil_cactus (Sexton) on Jun 28, 2007 at 04:58 UTC |