```python
def tag_trim(tag: str) -> str:
    if tag.startswith('#') and tag.endswith(':'):
        return tag[1:-1]
    return tag
```