Find and replace regex and use result in replace


I’m attempting to find and replace $_GET[’[^’]+’] with ($1) but it literally replaces with (1) rather than (_GET[’’])

Can Atom handle this kind of find and replace?


You have no capture so there is no first thing to be replaced by $1. Also, the first bracket has no matching end bracket. I think you meant to use \[.




I think it copied weird maybe. This is what I’m using.

A capture group is ()? so (\$_GET\['[^']+'\])? Not exactly familiar with regex.


Yes. Good luck …


Got it.