php - vqmod wildcard search using regex -
as example here trying replace $this->load->model(*);, * represents wildcard search/replace. correct way in regex?
<operation> <search regex="true" position="replace"><![cdata[ $this->load->model(.*); ]]></search> <add><![cdata[ $this->load->model('catalog/information'); ]]></add> </operation>
the escaping required should pretty minimal. need escape $ , parentheses so
<search regex="true" position="replace"><![cdata[~\$this->load->model\(.*?\);~]]></search> also you've rightly done in answer this, need add delimiter (i find ~ far less in string / hence using instead)
Comments
Post a Comment