As in the title, how can I make the code below match
?
a = "a"
ismatch(r"th$(a)t", "this that") # returns false
The problem is that $
has a meaning in a regular expression, but is also used for interpolating strings in Julia.
As in the title, how can I make the code below match
?
a = "a"
ismatch(r"th$(a)t", "this that") # returns false
The problem is that $
has a meaning in a regular expression, but is also used for interpolating strings in Julia.
In an ideal world this thread would pop up as a suggestion as you typed the title of your post:
I tried searching first but nothing useful came up
julia> a = "a"
julia> ismatch(Regex("th$(a)t"), "this that")
true