[Issue 20217] Regex literals don't escape double quotes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 16 20:34:00 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=20217

Adam D. Ruppe <destructionator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |destructionator at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from Adam D. Ruppe <destructionator at gmail.com> ---
Note that there's no such thing as a regex literal in D, they are just
different types of strings. The r"xxx" string  specifically does not have
escaping. If you want that, you can try plain "" strings. Or if you want to go
raw, use the `string`.

But the key thing to remember is they are all strings, there's nothing special
about using it with the regex function.

--


More information about the Digitalmars-d-bugs mailing list