I'm working on a class to get mails and saves it i an archive.
To grab the inlined images of the message i use 'preg_match_all' to grab the path to the images, which will be changed later.
It works perfect in this example:
PHP Code:
$message '<img width="220" height="43" id="_x0000_i1028" src="cid:image001.jpg@01CDAC83.10DC03C0" alt="Data Gården logo">';

$SearchImageName 'image001.jpg';

In this example the above search pattern does not work because it only has a wildcard behind the $SearchImageName. But I can't make it work with a wildcard in front of the $SearchImageName.
I also have a problem with the file extension has been changed to .ashx instead of .jpg :

PHP Code:
$message '<img id="content_0_img" src="http://danskeark.dk/~/media/Dark/Nyheder/Fokus-fotos/2012_10_17_fokus%20kopi.ashx?mw=470&amp;as=1">'

$SearchImageName '2012_10_17_fokus kopi.jpg'
Any ideas for a search pattern?