in reply to Re: Re: Regex?
in thread Regex?

His sample data looks like it has newlines. Did you test yours with a newline in the data? It should work fine (for some definition of "fine") if the data contains one.

This may well be the problem. He may be removing the newline, for instance. But, as given, there isn't error at all. The code works.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: Re: Re: Re: Regex?
by Cody Pendant (Prior) on Jul 01, 2003 at 23:03 UTC
    I'm wondering if maybe it's the last chicken in the shop, I mean, the last line in a block, and that \n should be (\n|\z), i.e. "a newline or the end of the file". I got caught by that one recently...

    “Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
    M-J D