You are here: Re: Regex problem « PHP Programming Language « IT news, forums, messages
Re: Regex problem

Posted by Razvan on 03/25/07 09:28

On Mar 24, 1:45 pm, "Alan" <a...@spamless.net> wrote:
> "Razvan" <defconh...@gmail.com> wrote in message
>
> news:1174729037.379978.230910@o5g2000hsb.googlegroups.com...
>
>
>
> > Hello there,
>
> > I have the following problem:
> > I have a big html and i want to remove from it everything between some
> > tags and to keep the rest, of course using regex, but any solution
> > will be great.
> > The number and type of tags may vary. Here is an example:
>
> > <body>
> > text text text text text text text
> > text text text
> > text text text text
>
> > <remove1>
> > text text text text text text
> > text text
> > text
> > text text text
> > </remove1>
>
> > text text text
> > text text
>
> > <remove1>
> > text text text text
> > </remove1>
>
> > text text
> > text text
> > text text text
>
> > <remove2>
> > text text text text text
> > text text text
> > text text
> > </remove2>
>
> > text text text text text
> > text text text text
> > </body>
>
> > Any suggestions will be appreciated !
> > Thanks.
>
> regex search and replace with <(/?[^\>]+)> and "" leaves just your text text
> text etc
>
> Possible some flavours may need escaping: \<(/?[^\>]+)\>
> hth
>
> Alan

i dont understand what are you trying to say. i want to remove
everything between <removeX> and </removeX> including tags.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация