in reply to Re: Capturing everything after an optional character in a regex?
in thread Capturing everything after an optional character in a regex?

Allolex, your piece o' code doesn't really satisfy the needs of Anonymous Monk, he needed to capture the whole line if there is no X.

saouq's code is simply beautiful, maybe someday my code will look like that :)

apparently yours,
J
  • Comment on Re: Re: Capturing everything after an optional character in a regex?

Replies are listed 'Best First'.
Re: Re: Re: Capturing everything after an optional character in a regex?
by allolex (Curate) on Dec 04, 2003 at 11:45 UTC

    Well, it meets the original requirements as I understood them. See my previous reply to saouq's node for part of the reason (besides laziness and stupidity on my part)---It's nice to see that I'm not the only one who doesn't read the whole thread before posting ;) For the record, davido /msg'd me concerning this about three seconds after I hit 'create'... Even at past 2 a.m. his time, he was more alert than me.

    --
    Allolex

      Well, it meets the original requirements as I understood them.

      And you shouldn't fault yourself either. You can't be expected to understand the requirements any better than they are communicated. In this case, they were very poorly communicated. For that matter, we still haven't been given enough information to answer this with confidence. I have asked for a restatement. We'll see if we get one.

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