Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. 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!"
  2. matches = re.findall("@w+", string)
  3. print(macthes)
  4.  
  5. #return ['@david', '@nick', '@jack', '@google', '@yahoo']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement