ok so I am trying to take a long select list formated like this:
<option ringto="+93-" value="93">Afghanistan</option>
<option ringto="+355-" value="355">Albania</option>
<option ringto="+213-" value="213">Algeria</option>
and convert that to the following:
'Afghanistan' => '93',
'Albania' => '355',
'Algeria' => '213',
basically I am using a text editor to convert a select list for country codes (phone) to php array. we are talking about 225 or so rows so manually is not an option heh..
how do I use regex to search/replace the patern:
<option ringto="+93-" value="{1}">{2}</option>
to
'{2}' => '{1}'
Search for
and replace all with
Let’s hope you’re using a text editor with Perl-compatible regular expression support.