Is there a way to make ^
and $
also match \r\n
style line endings?
julia> str = "foo\r\nbar\r\n\baz";
julia> str2 = replace(str, "\r\n" => "\n");
julia> m = match(r"^bar$"m, str)
julia> m = match(r"^bar$"m, str2)
RegexMatch("bar")
julia> match(r"(*ANYCRLF)^bar$"m, str)
RegexMatch("bar")
TIL
Thanks!
Reference: http://www.pcre.org/current/doc/html/pcre2syntax.html#SEC17
Last updated: Nov 06 2024 at 04:40 UTC