I need to upgrade my software from php 5.2.6 to 7.00
I have to update some outdated code like building arrays.
Array keys must be declared in double quotes.
I want to use netbeans to search and replace occurrences using RegExr.
Substitution does not have to be performed if the key is named with a variable or contains a number.
I was able to find a nearly working regex expression.
The problem is that the first replaced letter is removed.
I ask for your help and enclose the result I would like.
Thank you
PROBLEM From
$array = array();
$array[penne] = 1; <- my actual code (deprecated)
$array[$name] = 2;
$array[0] = 3;
$array["gomme"] = 4;
To
$array = array();
$array["penne"] = 1; <- correction I want
$array[$name] = 2;
$array[0] = 3;
$array["gomme"] = 4;
REPLACE WITH NETBEANS REGEXR
$array = array();
$array["enne"] = 1; <- NO!!! WHY ????
$array[$name] = 2;
$array[0] = 3;
$array["gomme"] = 4;
