Показать сообщение отдельно

  #142  
Старый 28.12.2008, 11:48
astrologer
Постоянный
Регистрация: 30.08.2007
Сообщений: 773
С нами: 9840758

Репутация: 808


По умолчанию

PHP код:
<pre>
<?

$text 
= <<<markup

<form action=http://example.com></form>
<form action="http://example.com"></form>
<form action='http://example.com'></form>

<form action  =  "http://example.com"></form>
<form action    ="http://example.com"></form>
<form action=    "http://example.com"></form>

markup;

$pattern = <<<regexp
~action\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)~
regexp;

$text preg_replace($pattern'action="my.php"'$text);

echo 
htmlspecialchars($text);

?>
</pre>
 
Ответить с цитированием