I am trying to use regex to remove @tags from a string in python however when i try to do this
str = ' you @warui and @madawar '
h = re.search('@\w*',str,re.M|re.I)
print h.group()
It outputs only the first @tag.
@warui
and when i try it on http://regexr.com?304a6 it works
re.search()will only match one occurrence of the pattern. If you want to find more, try usingre.findall().