Thank you, I found this thread before but this was not satisfactory for my purposes. I found a different workaround:
stripChar = (s, r) -> replace(s, Regex("[$r]") => "")
With this function I convert “[1,2,3]” to “1 2 3” (if r=“][,”) , which can be easily parsed to a vector by
parse.(Int, split("1 2 3") )