Automate search and replace


Is there any way to automate the search and replace process? that is, I am in a project where I continually have to format text to visually understand it. For example, replace the text }, ’ with },\n’. Is there any way to add that to some keyboard shortcut?