jgp4 Posted October 25, 2006 Share Posted October 25, 2006 I've been going thru forum after forum looking for an answer to this, but can find nothing, so I hope someone here can help.Say I have a string, and inside it is the text ::include(/includes/snippets/snippet.php)::what i'd like to do is find that text, extract the text from between the ::'s and eval() it, then do a preg_replace to insert the code generated back in - can someone help, I have no idea how to do regex's.Thanks. Link to comment https://forums.phpfreaks.com/topic/25086-some1-who-knows-regex-eval-pls-help/ Share on other sites More sharing options...
effigy Posted October 25, 2006 Share Posted October 25, 2006 Use[tt] preg_replace_callback[/tt]; your regex will be [tt]/::(.+?)::/[/tt]. Link to comment https://forums.phpfreaks.com/topic/25086-some1-who-knows-regex-eval-pls-help/#findComment-114376 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.