Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- need help with preg replace


darkage - 9:35 pm on Dec 26, 2008 (gmt 0)


The ungreedy modified is due to having several paragraphs <p></p> so I want to make the "smallest" match, which might not be needed since I negating the '<' and '>'.

I have an issue though with negating the '<' and '>'. I cant replace multiple keywords with links within the same paragraph as once the first replacement is done, it now contains <a href="" ... so all other matches on that paragraph fails.

Have to look into what's the best way to solve it (avoid replacing keywords that have already been replaced and thus are a link or in other words avoid links in links - get it? :-).

Any input ?


Thread source:: http://www.webmasterworld.com/php/3814557.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com