how would I do this?
Posted: Sun Apr 16, 2006 12:31 pm
I think an ereg replace would do this but I have a huge file basicially looking like this:
this dosnt seem to work, what should I do?
and I would like it to be something like:100-200xx10.jpg">100-200xx10.jpg</A> 10-Apr-2006 16:38 3k
100-200xx11.jpg">100-200xx11.jpg</A> 10-Apr-2006 16:49 4k
100-200xx16.jpg">100-200xx16.jpg</A> 10-Apr-2006 16:52 16k
I think a ereg replace would do this but it dosnt seem to be100-200xx10.jpg
100-200xx11.jpg
100-200xx16.jpg
Code: Select all
<?PHP
$string = '100-200xx10.jpg">100-200xx10.jpg</A> 10-Apr-2006 16:38 3k
100-200xx11.jpg">100-200xx11.jpg</A> 10-Apr-2006 16:49 4k
100-200xx16.jpg">100-200xx16.jpg</A> 10-Apr-2006 16:52 16k ';
echo ereg_replace('">[a-zA-Z0-9.<>/- ]', '', $string);
?>