in reply to regex to match the following

Hope this small piece would of some help...Because your file has uniform pattern so without regex also this can be tackled

#! /usr/bin/perl -w use strict; open (FH,"infile") or die "File cant be open\n"; while(<FH>) { my @temp=split(/"/); if ($temp[1] eq 'stored-procedure') { print "$temp[3]\n"; } } close(FH);

But as always "There's more than one way to do it" n better also :)

Replies are listed 'Best First'.
Re^2: regex to match the following
by johngg (Canon) on May 08, 2007 at 10:52 UTC
    Sadly, the file does not have a uniform pattern. Several lines have the id="..." before the type="stored-procedure" so I think your method might fail.

    Cheers,

    JohnGG