Reading(?) escape chars
<p>I'm trying to read a .php file and replace the hex'd chars.
The php file is of the following format:</p>

<pre><code>&lt;?php ${"\x47\x4c\x4f\x42\x41\x4cS"}["\x6ana\x76\x79\x77\x70\x74\x62x"] ... ?&gt;
</code></pre>

<p>The problem is that it messes up the escape chars ( \" )</p>

<p>My code so far:</p>

<pre><code>while(i&lt;=filelen)
{
    if(str[i]=='\\' &amp;&amp; str[i+1]=='x' &amp;&amp; (str[i+2]&gt;=48 &amp;&amp; str[i+2]&lt;=57 || str[i+2]&gt;=97 &amp;&amp; str[i+2]&lt;=122) )
    {
        string temp(str.substr(i,4));
        stringstream k;
        temp.erase(0,2);
        string temp2;
        temp2=hexToAscii(temp[0],temp[1]);
        output.append(temp2);
        i+=4;
    }
    else 
    {
        stringstream k;
        k&lt;&lt;str[i];
        output.append(k.str());
        i++;
    }
}
</code></pre>

<p>Any ideas?</p>
