On Tue, Sep 07, 2004, Michael Schloh von Bennewitz wrote:

> On Mon, Sep 06, 2004, Ralf S. Engelschall wrote:
> > On Mon, Sep 06, 2004, Michael Schloh wrote:
> >>   +    %{l_shtool} subst \
> >>   +        -e 's/#include "fakepcap.h";/#include "fakepcap.h"/' \
> >>   +        tcpprep.c
> >>
> > Err... either I've missed some deep magic here or this substitution is
> > actually a "no operation", isn't it? Also, please remember that the in
> > regular expressions you have to escape dots...
> >
> You are both right and wrong. It is not a non operation, because it removes
> the ';' following a preprocessor include. Mostly right on the dots, although
> in this context only leads to unintentional substitutions in rediculously
> seldom seen (and somewhat erroneous) conditions.

Ah, I see. I've overlooked the semicolon.
Then I suggest the more obvious and "dot-fixed" one:

's/\(#include "fakepcap\.h"\);/\1/'

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   [EMAIL PROTECTED]

Reply via email to