function yang_keyword_link($content,$keyword,$link){
//排除图片中的关键词
$content = preg_replace( '|(<img[^>]*?)('.$keyword.')([^>]*?>)|U', '$1%&&&&&%$3', $content);
$regEx = '/(?!((<.*?)|(<a.*?)))('.$keyword.')(?!(([^<>]*?)>)|([^>]*?<\/a>))/si';
$url='<a href="'.$link.'" target="_blank" class="content_guanjianci">'.$keyword.'</a>';
$content = preg_replace($regEx,$url,$content,1);
//还原图片中的关键词
$content=str_replace('%&&&&&%',$keyword,$content);
return $content;
}
愿你以后有烟有酒有姑娘,能吹能闹能干架,此生纵情豁达。愿我今后能哭能笑能随性,敢爱敢恨敢追逐,此生干净明亮。而我们,岁岁年年生死不复见。