Here is a line.
<a class="history-item product" title="USB Keyboard Leather Cover Case Bag for 7" Tablet PC MID PDA VIA 8650,Free Shipping + Drop Shipping" href="http://www.aliexpress.com/product-gs/495886336-USB-Keyboard- Leather-Cover-Case-Bag-for-7-Tablet-PC-MID-PDA-VIA-8650- Free-Shipping-wholesalers.html">USB Keyboard Leather Cover Case Bag for 7" Tablet PC MID PDA VIA 8650,Free Shipping + Drop Shipping</a>
From it you need to pull out the title and the link itself, take between quotes with the help of the named parts of the template. Here is just the title and still does not work .. how to write correctly?
$pattern7='#<a class="history-item product" title="(?<Cost2>.*)".*#Ui';