Issues with std.regex

FG home at fgda.pl
Sat Feb 16 14:13:48 PST 2013


On 2013-02-16 22:36, MrAppleseed wrote:
>> Perhaps try this:  "[ 0-9a-zA-Z.*=+-;()\"\'\\[\\]<>,{}^#/\\]"
>
> I made the changes you suggested above, and although it compiled fine, on the
> first run I got a similar error:
>
> std.regex.RegexException@/usr/include/dmd/phobos/std/regex.d(1942): unexpected
> end of CodepointSet
> Pattern with error: `[ 0-9a-zA-Z.*=+-;()"'\[\]<>,{}^#/\]` <--HERE-- ``

Ah, right. Sorry for that. You'd need as much as 4 backslashes there. :)
"[ 0-9a-zA-Z.*=+-;()\"\'\\[\\]<>,{}^#/\\\\]"

Ain't pretty so it's better to go with raw strings, but apparently there are 
some problems with them right now, looking at the other posts here, right?


More information about the Digitalmars-d-learn mailing list