In Atom, I'm working with a huge text file and I have to replace any occurrences of
.env(bar)
with
.env('bar')
where bar
can have several values, with the standard Find-Replace tool.
I successfully managed to select (Find field) the patterns I want to change thanks to
.env(\(([^\)]+)\))
as reported here.
However I cannot find any proper regex to fill into the Replace field in order to wrap between quotes, e.g. none of these work:
.env(\'\(([^\)]+)\)\')
.env('\(([^\)]+)\)')
Moreover, how can I revert the whole process (also using Find-Replace regex)?
Thanks!