import re

text = """an id: @username1
another id:@username2
not an id@username
"""
print(re.findall('\B@\w+', text))