import re text = """an id: @username1another id:@username2not an id@username"""print(re.findall('\B@\w+', text))
Standard input is empty
['@username1', '@username2']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!