neoform Posted May 12, 2008 Share Posted May 12, 2008 How can I modify this to exclude any string that contains "Image: as the first set of chars in the brackets? (this is for parsing Wikipedia's formatting) $str = preg_replace("`\[\[(.*)\]\]`siU", "<a href=\"\\1\">\\1</a>", $str); Quote Link to comment Share on other sites More sharing options...
effigy Posted May 12, 2008 Share Posted May 12, 2008 "`\[\[(?!Image:)(.*)\]\]`siU" Quote Link to comment Share on other sites More sharing options...
neoform Posted May 12, 2008 Author Share Posted May 12, 2008 Nice thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.