Remove the double quotes from the regular expression in the match:
if [[ "$test" =~ $re ]]; then
echo "match!"
fi
In double square brackets, there is no need to quote variables, as they are parsed in a special way. See man bash
for details:
Word splitting and pathname expansion are not performed on the words between the [[ and ]]; tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal are performed.