awsomejoe23
03-02-2008, 05:31 AM
I have a .txt file that has something like this
1
<a href="/projects/emule/">eMule</a>
391,631,805
2
<a href="/projects/azureus/">Azureus</a>
162,516,119
3
<a href="/projects/aresgalaxy/">Ares Galaxy</a>
144,396,278
4
<a href="/projects/bittorrent/">BitTorrent</a>
51,850,559
I need all the empty line deleted.
I've tried the following
function removeEmptyLines($string)
{
return preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $string);
}
_____________________________________
$content = eregi_replace("\"","'",$content);
$content = eregi_replace("\n","",$content);
$content = eregi_replace("\r","",$content);
Thank you for your time and effort,
Joe
1
<a href="/projects/emule/">eMule</a>
391,631,805
2
<a href="/projects/azureus/">Azureus</a>
162,516,119
3
<a href="/projects/aresgalaxy/">Ares Galaxy</a>
144,396,278
4
<a href="/projects/bittorrent/">BitTorrent</a>
51,850,559
I need all the empty line deleted.
I've tried the following
function removeEmptyLines($string)
{
return preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $string);
}
_____________________________________
$content = eregi_replace("\"","'",$content);
$content = eregi_replace("\n","",$content);
$content = eregi_replace("\r","",$content);
Thank you for your time and effort,
Joe