PHP Regex Pattern To Match And Strip Out Embedded Images in Text Email -


how can strip out embedded images in text based emails following pattern?

[cid:b54fd59f-8de7-4ed1-a0c7-19e52f83a8d7]

those guids, regex provide clean match , replace empty string

$pattern = '/\[cid\:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\]/i'; $formattedstring = preg_replace($pattern, "", $string); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -