Let's say you have a string of data that contains a wildcard character.
foo="*.example.com"
If you want to replace the wildcard character with something else in sed, you'll need to first escape the wildcard character in sed.
echo $foo | sed 's|\*|TEST|'
In this example, $foo will be become:
TEST.example.com