# New Ticket Created by  Zefram 
# Please include the string:  [perl #128547]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128547 >


doc/Language/regexes.pod says:

# The C<^^> assertion matches at the start of a logical line. That is, either
# at the start of the string, or after a newline character.

Actual behaviour:

> /\n^^/.ACCEPTS("\na").Bool
True
> /\n^^/.ACCEPTS("\n").Bool
False

/^^/ doesn't match after a newline character if that's at the end
of the string.  This mismatch appears to be a documentation bug: the
behaviour of /^^/ is consistent with that of /$$/, which is consistent
with its documentation.  The description of /^^/ needs to adopt the
"when the last character is not a newline character" qualifier from the
description of /$$/.

-zefram

Reply via email to