[ create a new paste ] login | about

Link: http://codepad.org/EscseAIp    [ raw code | output | fork ]

PHP, pasted on Aug 20:
<?php

$html = '<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>
            hey
        </title>
        <script>
            alert("hello");
        </script>
    </head>
    <body>
        hey
    </body>
</html>
';

$html = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $html);

echo $html;

?>


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>
            hey
        </title>
        
    </head>
    <body>
        hey
    </body>
</html>


Create a new paste based on this one


Comments: