제발, 나는 올바른 정규식을 만드는 데 도움이 필요합니다.무엇이든간에 일치하는 정규식
나는 내게 많은 노력이 출력 2%65%66%_WHATEVER_8%74%74
를 제공하기 위해 어떤 ")
Decode("
사이를 감지하고 싶지만, 아무것도 나에게 내가 원하는 정확한 출력을 제공하기 위해 제대로 작동하지 않습니다.
내 코드 :
코멘트에 명시된 바와 같이$string = '
<td class="red"><script type="text/javascript">Decode("2%65%66%_WHATEVER_8%74%74")</script></td>
<td class="green"><script type="text/javascript">Decode("2%65%66%_WHATEVER_8%74%74")</script></td>
<td class="red"><script type="text/javascript">Decode("2%65%66%_WHATEVER_8%74%74")</script></td>
';
$pattern = '/Decode("([^*]+)")/i';
preg_match_all($pattern, $string, $matches);
print_r($matches[1]);