import re

strings = [
    "asd-wqe ffvrf",
    "asd-ss sd",
    "a-word",
    "a-verylongword",
    "an-extremelyverylongword"
]
pattern = r"(?<=-)\w+"
for s in strings:
    print(re.sub(pattern, lambda x: len(x.group()) * "*", s))