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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -