You are here: Re: regular expressions conditional replace « PHP Language « IT news, forums, messages
Re: regular expressions conditional replace

Posted by Oli Filth on 05/16/05 20:33

Mig21 wrote:
> hi
>
> i am trying to make a bbcode parser and i get stuck at this :(
>
> i want to replace all '\n' with "<br />\n" in a text unless it's in
> between <pre></pre> tags. i can't figure out a way to conditionally
> replace anything.
>

If you're getting this problem, you're writing your parser back to
front. You need to split on the <pre> tags first, and then parse each
section separately.

--
Oli

 

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

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