http://qs321.pair.com?node_id=11116878


in reply to Re^5: Regex with Backslashes
in thread Regex with Backslashes

It would be presumptuous of me to answer your question, especially as my programming skills are just at hobby level, but I recognize that backslash in a single quoted string behaves differently before a ', so you effectively lose the closing quote. I do note that print '\'' . "\n"; prints "'" which would allow you to include a single quote inside a single quoted string much as you would use \" to include double quotes in a double quoted string.

As to my grasp of <'\x' and '\\x' produce the same string by using two different representations of the same character>, you're right!

Replies are listed 'Best First'.
Re^7: Regex with Backslashes
by AnomalousMonk (Archbishop) on May 17, 2020 at 23:13 UTC

    It may or may not be presumptuous of you to answer the question, but it's clear that you understand what I said you did not. Please accept my apology! :)


    Give a man a fish:  <%-{-{-{-<

      Most certainly accepted