文字列値を取得し、後で使用したいurldecode()
。
Javascript
document.write(unescape('%46%43%20%42%72%61%73%6f%76%20%76%73%2e%20%43%53%4d%53%20%49%61%73%69'));
PHP
$string = "document.write(unescape('%46%43%20%42%72%61%73%6f%76%20%76%73%2e%20%43%53%4d%53%20%49%61%73%69'));";
preg_match('/document.write(unescape(\'.*\'));/', $string,$matches);
var_dump($matches);
しかし、このリターンarray(0) { }