Bug 7739 – regex fails to accept \p in expression of unicode properties

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-19T19:47:00Z
Last change time
2012-03-20T03:16:50Z
Assigned to
nobody
Creator
jayn

Comments

Comment #0 by jayn — 2012-03-19T19:47:00Z
dmd 2.058 win7-64 void wcp (string fn) { enum ctr = ctRegex!("\p{WhiteSpace}","m"); } ------ Build started: Project: a7, Configuration: Release Win32 ------ Building Release\a7.exe... a7.d(210): undefined escape sequence \p
Comment #1 by dmitry.olsh — 2012-03-20T03:16:50Z
It's jsut wrong bug report, D string literal as C one do have escaping of their own, use raw string literals or double escape \\. It's dmd lexer that complains here btw.