cali_dotcom Posted January 22, 2010 Share Posted January 22, 2010 i need some help with logic here. i am reading contents with ob_get_contents. then i need to search for and fetch the contents and id's in a custom tag. eg: <translate id="4" token_id="0" variant_id="1">contents............</translate>. i wanted to do that with preg_match_all but it get complicated trying to fetch the id's. does anyone have a better idea how best to go about it? Link to comment https://forums.phpfreaks.com/topic/189406-preg_match_allregex/ Share on other sites More sharing options...
laffin Posted January 22, 2010 Share Posted January 22, 2010 this should work as a pattern string <translate id=\"(\d+)\" .*?>(.*?)<\/translate> Link to comment https://forums.phpfreaks.com/topic/189406-preg_match_allregex/#findComment-999773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.