I noticed sweet_xml returns single quoted strings instead of double, and now I have this error where I can’t seem to do anything with these. I need to go reread how a ‘character map’ is different from a string, but…
why does this happen? (notice the 4 arguments
iex(7)> Regex.replace(regex, 'hello', "https://")
** (FunctionClauseError) no function clause matching in Regex.replace/4
The following arguments were given to Regex.replace/4:
# 1
~r/^\/\//
# 2
'hello'
# 3
"https://"
# 4
[]
Single-quoted and double-quoted are not equivalent in Elixir. Single quoted are charlists (rarely used, unless you are interfacing with Erlang) and double-quoted are proper Elixir strings. Use double-quoted consistently and you should be good.