finding and returning a string with a specified prefix
- by tipu
I am close but I am not sure what to do with the restuling match object. If I do
p = re.search('[/@.* /]', str)
I'll get any words that start with @ and end up with a space. This is what I want. However this returns a Match object that I dont' know what to do with. What's the most computationally efficient way of finding and returning a string which is prefixed with a @?
For example,
"Hi there @guy"
After doing the proper calculations, I would be returned
guy