On Fri, 2013-02-08 at 14:04 -0600, Mike Grau wrote:
> Martin Gregorie wrote:
> > On Fri, 2013-02-08 at 13:26 -0600, Mike Grau wrote:
> >> Hello folks.
> >>
> >> In 20_body_tests.cf (SA 3.3.2) there is this rule:
> >>
> >> body TRACKER_ID   /^[a-z0-9]{6,24}[-_a-z0-9]{12,36}[a-z0-9{6,24}\s*\z/is
> >>
> >> What is the "\z" in the regex?
> >>
> > According to the O'Reilly Camel Book, "Programming Perl", \z matches the
> > last character in a string but offers no additional help. Many
> 
> Thanks Martin,
> 
> But, is that not "\Z" (upper case)?

\Z is similar: it allows an optional newline after the character that \Z
matches: 

\z matches the character at the end of the string
\Z matches the character at the end of the string, optionally followed
   by a newline 

The regex you were discussing has \z as its terminal symbol so that's
what I described. AFAIK the terminal '/i' does not affect the meanings
of symbols such as \z or \Z.


Martin


Reply via email to