In Aptana (Eclipse), I want to replace in a lot of file PHP associative array by objects :
$requete["something"]
by
$row->something
I've tried this, SEARCH :
\$requete\[\"([\w.])+\"\]
with, REPLACE:
\$row->$1
but the regex engine only takes the last character of the search : g for something
Any ideas welcome ! Thanks
The reason the regex is only matching the last character of the group is the plus sign is outside the word match group. Also, the period is unneeded.
To fix the Regex, replace the period after the w
with the plus sign
\$requete\[\"([\w]+)\"\]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With