tailoring a regex: plz review the allreay nice running code
Posted: Sat Dec 11, 2010 4:26 pm
Good evening dear friends,
i am currently ironing out some parsers. Well - how can we apply this pice of code:
to this new Target-URL2:
http://www.schulministerium.nrw.de/BP/S ... pDO=154763
Note: if i have parser for the above mentioned sites - then i would be able to solve important
things... So i would love to get this issues solved.
Note the second example has some kind of invalid HTML...
By the way: because of the invalid HTML (in the above mentioned target-Url2)
I muses about a solution that makes usage of DOMDocument::getElementsByTagName
love to hear from you!
i am currently ironing out some parsers. Well - how can we apply this pice of code:
Code: Select all
<?php
$content = file_get_contents("http://schulnetz.nibis.de/db/schulen/schule.php?schulnr=94468&lschb");
var_dump($content);
$pattern = '/<td>(.*?)<\/td>/si';
preg_match_all($pattern,$content,$matches);
foreach ($matches[1] as $match) {
$match = strip_tags($match);
$match = trim($match);
var_dump($match);
}
<php
http://www.schulministerium.nrw.de/BP/S ... pDO=154763
Note: if i have parser for the above mentioned sites - then i would be able to solve important
things... So i would love to get this issues solved.
Note the second example has some kind of invalid HTML...
By the way: because of the invalid HTML (in the above mentioned target-Url2)
I muses about a solution that makes usage of DOMDocument::getElementsByTagName
love to hear from you!