Reputation: 12869
I am trying to write different sed scripts for beautifying ruby code.
One of the cases i am trying to solve is to replace a=>b
or a=> b
strings with a => b
.
The regex for matching this condition is [^ ]=>
but it also matches 1 character before =>
.
So, when i try to replace it is not giving me the desired result with s/[^ ]=>/ =>/g
Any suggestions?
Upvotes: 0
Views: 230