Strange regex error (bug?)

Eben60
Mon, 25 Jul 2022 15:02:45 +0000
General Usage

julia> r"^\s*text"
r"^\s*text"

julia> Regex("^\s*text")
ERROR: syntax: invalid escape sequence

Julia 1.7.3 on Win10

And BTW what does the following error message mean?

julia> r"^[:space:]*text"
ERROR: LoadError: PCRE compilation error: POSIX named classes are supported only within a class at offset 1

4 posts - 3 participants