in reply to differnce between egrep and perl regex ?

If possible, it's always best to fix the problem at the source. "Regular" expressions are far from regular. As you've already discovered, there are DFA and NFA engines. DFA engines are much faster, but can't match sections of the text to variables. Also, is this alledgedly a PCRE (Perl Compatible Regular Expression)? Is it from egrep or awk? There are many different regular expression engines out there. Someone telling you that "this is a regex" is the same thing as someone handing you code you don't recognize and saying "this is a programming language."

Cheers,
Ovid

New address of my CGI Course.

  • Comment on Re: differnce between egrep and perl regex ?

Replies are listed 'Best First'.
Re^2: differnce between egrep and perl regex ?
by Random_Walk (Prior) on Oct 12, 2004 at 14:03 UTC
    Ovid

    At first they told me "this is regex, we think its Perl", (I got the pattern files through our non-technical account manager). I asked for confirmation from the techies and I now get the reply (two months later, summer hols all round) that it is egrep regex. Of course we go live ASAP and I have a nice, Perl based solution developed and can think of little worse than a re-write to shell/egrep or perl-forking egreps.

    Cheers,
    R.