Re: eregi replace help
| From: | maatt | Date: | Sat, 07 Jul 2001 23:39:53 +0000 |
| Subject: | Re: eregi replace help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56693@lists.php.net to get a copy of this message | ||
ereg_replace("> <[^<]*</a>", "", $string);
or
ereg_replace("&.*\n", "", $string) if the unwanted bits end in new-lines
??
"Richard van Leeuwen" <lacarte@zonnet.nl> wrote in message
news:20010706172510.19026.qmail@pb1.pair.com...
> I want to delete some lines
>
> original:
>
> <a href="http://www.example.com/1.html"
> >ABCD</a>
> > <a href="www.example.com/title.html#1234">Football</a>
> <a href="http://www.example.com/2.html"
> >BCDE</a>
> > <a href="www.example.com/title.html#2345">Tennis</a>
> <a href="http://www.example.com/3.html"
> >CDEF</a>
> > <a href="www.example.com/title.html#1234">Football</a>
> <a href="http://www.example.com/4.html"
> >DEFG</a>
> > <a href="www.example.com/title.html#3456">Basketball</a>
> <a href="http://www.example.com/5.html"
> >EFGH</a>
> > <a href="www.example.com/title.html#2345">Tennis</a>
> <a href="http://www.example.com/6.html"
> >FGHI</a>
>
> after:
>
> <a href="http://www.example.com/1.html"
> >ABCD</a>
> <a href="http://www.example.com/2.html"
> >BCDE</a>
> <a href="http://www.example.com/3.html"
> >CDEF</a>
> <a href="http://www.example.com/4.html"
> >DEFG</a>
> <a href="http://www.example.com/5.html"
> >EFGH</a>
> <a href="http://www.example.com/6.html"
> >FGHI</a>
>
> I tryed eregi replace with (.*)
> but that does not seem to work
>
> Thanks if you can help me
>
> Richard van Leeuwen
>
>
>
>
>