regex_from_macro = r"\d\d"
regex_from_function = Regex("\d\d") 

julia> regex_from_macro("45")
true 

julia> regex_from_function("45")
false 

julia> regex_from_macro("5")
false 

julia> regex_from_function("5") 
false


Why does calling r"\d\d" result in different behavior than Regex("\d\d")? I 
would have expected the behavior to be identical, but it looks like call 
with Regex(...) always returns false, while r"..." matches as expected.


This is with Julia v0.4.2.

Reply via email to