user2624107
user2624107

Reputation: 31

Netbeans regular expression search and replace

I would like to find and replace in project on netbeans by using regular expression.

Find $_SESSION['anything']['anything']

Replace with $this->Session->read('anything.anything');

Please help.

Upvotes: 1

Views: 1613

Answers (1)

m87
m87

Reputation: 4511

You could accomplish this in the following way ...

Find \$_SESSION\['(.*?)'\]\['(.*?)'\]

Replace with \$this->Session->read('$1.$2');

see regex demo / explanation

Upvotes: 3

Related Questions