You are here: Re: selecting specific tag « PHP Programming Language « IT news, forums, messages
Re: selecting specific tag

Posted by Stephen Kay on 04/03/06 23:17

in article e0rdf6$gk2$1@info.science.uva.nl, Y.G. at
yg_blah_@this_domain.bla wrote on 4/3/06 11:03 AM:

> preg_replace(
>>> '#^(.*)(<div class="foo">.*</div>)#isU',
>>> '$2$1',
>>> $content
>>> );


OK, I'm stupid, but how do you find and replace the BODY tag with
preg_replace?

Here's an example:

<BODY TEXT="#99FFFF" BGCOLOR="#000000" LINK="#ff99ff" VLINK="#ff99ff"
ALINK="#d3d3d3">


So I want to find "<BODY " and everything up to the next ">", and replace it
with "<!-- Body tag was here -->" (for example).

I have not figured out this preg syntax yet. :-(

--
Stephen Kay
Karma-Lab sk@karma-lab.NOSPAM.com
^^^^^^^

 

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

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