preg_match('/<div class="articleTitle">(.*?)<\/div>/i', $source, $matches);
print_r($matches);
Bu RegexBuddy gelen "explination" dir:
<div class="articleTitle">(.*?)</div>
Options: case insensitive
Match the characters “<div class="articleTitle">” literally «<div class="articleTitle">»
Match the regular expression below and capture its match into backreference number 1 «(.*?)»
Match any single character that is not a line break character «.*?»
Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
Match the characters “</div>” literally «</div>»
Created with RegexBuddy
(. *?) Ondan sonra gelir ne kadar daha önce ne gelir arasındaki her şeyi ele geçirecek, ve $ var eşleşen içine yerler olacak.
Ben HTML $ kaynak var içinde olacağı varsayılmıştır.
Sana RegexBuddy, bu 39.95 bulunuyor (USD) içine bakmak ama her kuruşa değer olduğunu göstermektedir. Çoğu her büyük RegEx uygulanması ile RegExs oluşturmanıza yardımcı olabilir, ve size RegEx öğrenmek için yardımcı olabilir