Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = "Hello, please send message to @david, @nick, @jack, but do not send message to any email address like json1234@google.com or nelson.tan@yahoo.com, thanks!"
- matches = re.findall("@w+", string)
- print(macthes)
- #return ['@david', '@nick', '@jack', '@google', '@yahoo']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement