I tried reading online tutorials about RegEx, but none of them give me a clear picture of how to find and replace with variables. As I now understand from the comments, regex is for searching only, so to specify, I want to do this using the Atom text editor. Alternatively using php.
What I want to do is to find and replace in this way:
"resolution": "800x600" ---> "width":"800", "height":"600"
"resolution": "1024x768" ---> "width":"1024", "height":"768"
Can anyone please explain how to do this, and how to use variables when replacing with regex?