user1393215
user1393215

Reputation:

Find and replace in Atom

I'm attempting to find and replace \$GET['[^']+'] with ($0) but it literally replaces with ($0) rather than ($GET[''])

Regex mode is active.

How can I search and replace using the results of the search in the replace?

Upvotes: 0

Views: 533

Answers (1)

user1393215
user1393215

Reputation:

The issue was that \$GET['[^']+'] doesn't have a capture group, and the first returned string is $1 not $0.

  • Find (\$GET['[^']+'])
  • Replace ($1)

Works as expected

Upvotes: 2

Related Questions