1
$string="18 Mar 2013 <b>...</b> And this is exactly what is sparking the resurgence of long-tail <br>  <b>keyword</b> targeting in <b>SEO</b>. I've observed this trend among both young <b>...</b>"
$string="May be <b>google</b> not considering Meta <b>keywords</b> for his searching, but meta <br>  descriptions play a vital role in your <b>SEO</b> practices,even including <b>...</b>"
$string="7 Jun 2010 <b>...</b> Picking <b>SEO Keywords</b>: Using <b>Google's</b> Wonder Wheel. This is in my opinion the <br>  best little secret of everyone's favorite search engine: the <b>...</b>"
$string="For search engine marketers -- and the companies who depend on them -- things <br>  just got a little tougher. <b>SEO</b> companies, most still reeling <b>...</b>"

$clean_string = preg_replace("need this here remove date regex syntax", "", $string);

need a reg ex or a small code. See the sample code above.. remove date at the beginning of the text.. not the same as changing the text and dates. I do not date as in the example at the beginning of some text. Thank you in advance to help friends

4

1 回答 1

2

这应该足以满足您的示例中显示的日期格式:

$result = preg_replace(
    '/^      # Start of string
    \d{1,2}  # 1-2 digits
    \s+      # whitespace
    [a-z]+   # 1 or more ASCII letters
    \s+      # whitespace
    \d{2,4}  # 2-4 digits
    \s*      # optional whitespace/ix', 
    '', $subject);
于 2013-06-09T14:02:16.847 回答