in reply to Re: regex needed with match operator
in thread regex needed with match operator

Thanks broquaint,
Would you mind explaining exactly what the \z and x are doing in the regex?

Thanks again

  • Comment on Re: Re: regex needed with match operator

Replies are listed 'Best First'.
Re: Re: Re: regex needed with match operator
by broquaint (Abbot) on Apr 28, 2003 at 13:47 UTC
    Would you mind explaining exactly what the \z and x are doing in the regex?
    Sure, to quote the docs
    \z Match only at end of string
    This is very similar to $ except $ matches the end of a line or before a newline.
    x Extend your pattern's legibility by permitting whitespace and comments.
    As it says, it allows for more readable regex, which is generally desirable considering the acute succinctness of regular expressions.
    HTH

    _________
    broquaint

      Thank you,
      It makes a lot more sense now, and I didn't realize the differnece between $, and \z, but now I do.