I'm reviewing a my old php software and I need to do some general corrections. I'm trying to do some of them automatically by regex, but in some cases without success. I use Netbeans.
I need to substitute all:
$line[word_test]
with
$line['word_test']
excluding the case where word_test is a var (i.e. $abc) or a number or contains the string "const"
I tried with several regex like
\$line\[[^'|\$|constan](.*)\]
but without success. I need both the regex to write in the "Containing Text" field and that one to write in "Replace with" field of Netbeans replace functionality.