Use string:trim rather than regex replace

This commit is contained in:
vmalepati1 2021-06-30 00:14:57 -04:00
parent e8a0db8eaf
commit 11c8af7492

View File

@ -193,7 +193,7 @@ connection_opts(Args, {env, URLName}) ->
DatabaseUrl -> connection_opts(Args, {url, DatabaseUrl})
end;
connection_opts(_Args, {url, DatabaseUrl}) ->
case uri_string:parse(re:replace(DatabaseUrl, "\\r|\\n", "", [global,{return,list}])) of
case uri_string:parse(string:trim(DatabaseUrl)) of
{error, Error, Term} ->
{error, {Error, Term}};
Map = #{userinfo := UserPass, host := Host, path := Path} ->