私のテキスト エディター (phpStorm、notepad++、jedit など) には、次のような文字列があります。
.... $this->request_json['store-user-id'] .....
.... $this->request_json['deviceID'] ....
それらを次のように置き換える必要があります。
$this->request->store_user_id
$this->request->device_id
すなわち
search: \-\>request_json\[\"([\w_\-]+)\"\]
replace: ->request->$1
BUT:追加のインライン置換 "-" -> "_"、小文字への変換、すべての大文字の前に "_" が必要です。
perlスタイルの正規表現を使用してそれは可能ですか? もしかして再帰?