in reply to Re^6: Converting Oracle report language code into perl
in thread Converting Oracle report language code into perl
Download and run this:
#! perl use warnings; use strict; my $def = <<'EOD'; .define get_user_info select user_location,user_name, user_company, &fax_header || +';style='|| letterhead, fax_printer, nvl(fax_yn,'N') into user_location, user_name, user_company, fax_header, fa +x_printer, fax_yn from security_header where user_id = lower(substr(user,5,10)) .. EOD $def =~ s/ ( \A \. \w+ \s ) ## $1 := A '.', followed a word and a space (\w+) ## $2 := Another word (\s+) ## $3 := Some whitespace (.+?) ## $4 := Some anything ( ## $5 \s+ ## Some whitespace select ## The word 'select' [^.]+ ## Lots of anything except a '.' ) \. \. \Z ## Two '.'s and the end of line /$2$5/smx ## . matches \n; ^ & $ match lines with the string or die 'Failed to match'; print $def;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |