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


These regexes parse and run fine (they match a single `#` character):

    /\#/;
    /^\#/;

But this one doesn't:

    /^ \#/;

The error thrown, is:

    ===SORRY!===
    Regex not terminated.
    at -e:1
    ------> /^ \#/⏏<EOL>
    Unable to parse regex; couldn't find final '/'
    at -e:1
    ------> /^ \#/⏏<EOL>
        expecting any of:
            infix stopper

It's as if the parser fails to recognize that the `#` character was
escaped (interpreting the backslash as unspace maybe?), and treats
everything until the end of the line as a comment.

This seems to be only happening when the escaped `#` character is
preceded by another token, *and* separated from it by whitespace.

Apparently this bug has always existed in Rakudo:
https://gist.github.com/Whateverable/ca082a33d2ab689bf3ca4b6f7ae2d19f

Reply via email to