I want to match e.g. \\t string, with 2 backslashes and one letter after it. With regexps, it can be easily done, but I fail to replicate it with Automa.jl.
This is my code, matcha(data) should return true, but returns false instead.
Occursin returns true as expected.
dat = raw"\\t"
occursin(r"^\\\\t$", dat)
machine = Automa.compile(re"\\\\t")
context = Automa.CodeGenContext(generator=:goto, checkbounds=false)
@eval function matcha(data)
$(Automa.generate_init_code(context, machine))
p_end = p_eof = lastindex(data)
$(Automa.generate_exec_code(context, machine))
return cs == 0
end
matcha(dat)
I tried different number of backslashes in re, but nothing worked.
I want to match e.g.
\\t
string, with 2 backslashes and one letter after it. With regexps, it can be easily done, but I fail to replicate it with Automa.jl. This is my code, matcha(data) should return true, but returns false instead. Occursin returns true as expected.I tried different number of backslashes in re, but nothing worked.
I'm using Julia 1.3-rc4, and automa 0.8.0.