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); Link to comment https://forums.phpfreaks.com/topic/105330-solved-url-vs-imageblah/ Share on other sites More sharing options...
effigy Posted May 12, 2008 Share Posted May 12, 2008 "`\[\[(?!Image:)(.*)\]\]`siU" Link to comment https://forums.phpfreaks.com/topic/105330-solved-url-vs-imageblah/#findComment-539465 Share on other sites More sharing options...
neoform Posted May 12, 2008 Author Share Posted May 12, 2008 Nice thanks. Link to comment https://forums.phpfreaks.com/topic/105330-solved-url-vs-imageblah/#findComment-539533 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.