def replace_special_characters(string: str):
    """Replace special characters in step id with -"""
    parts = []
    for word in string.split(' '):
        part = ''
        for c in word:
            if c.isalnum():
                part += c
            elif part:
                parts.append(part)
                part = ''
        if part:
            parts.append(part)
    return '-'.join(parts)