I am currently trying to improve the readability of some of my python scripts by adding spaces around the equal signs. For example, currently an assignment looks like this:
(?<=[\w\]\)])(=)(?=\w)
You can use this . Replacement by
" \1 "
See Demo.
http://regex101.com/r/vY0rD6/2
Your earlier regex had no captured pattern.So just added that.