Using sed, I am attempting to recursively search and replace a string foo that may have characters before it as well as after it.
For examples:-
"foo_
'foo_abc
I want to specifically replace foo with foobar so that my example above will become:-
"foobar_
'foobar_abc
I am not succeeding with:-
find . -name "*.py" | xargs sed -i '/*foo*/{s/foo/foobar/g}'
What should I do instead to search and replace successfully?