[ create a new paste ] login | about

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

Perl, pasted on Apr 19:
$data = <<EOF;
<html>
<Head><title>intranet mycompany</title></head>
<body> 
<div>blah</div>

<p>
the text i need to extract <br>

<ul>
<li>stuff i don't want.</li>
<li>more stuff i don't want.</li>
</ul>

More text i need to exctract.
</p> 
</html>
</body>
EOF

$data =~ s/<ul>.*<\/ul>//sg;

print $data;


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<html>
<Head><title>intranet mycompany</title></head>
<body> 
<div>blah</div>

<p>
the text i need to extract <br>



More text i need to exctract.
</p> 
</html>
</body>


Create a new paste based on this one


Comments: