Okay so this may be just googling wrong or not reading documentation correctly, but I couldn't find anything on this.
Say I have:
sample_str = "rose aaron robert moro"
pat = 'ro'
I want to find all instances of words (preferably using re.search()) which DON'T end OR begin in 'ro'. That is, I want one or more character to be before and after 'ro'. So I would want 'aaron' to match, but not at any of the other words in sample_str.
How would I do this? I tried a bunch of things, including '+ro+', but it gave me an error. I am not new to Python but have some trouble with the Regex, so if anyone can please explain that would be great.
Thanks
strmethods?