我只想在这里替换"doi:yyyy.yyyy“,但是$1并没有还给我那个文本。为什么?;-)
$zp_citation['citation'] = preg_replace('(doi:[^ <]*)',
'<b>' . '$1' . " - where did doi go?" . '</b>',
$zp_citation['citation'],
1);发布于 2013-12-23 04:46:03
您缺少必需的regex delimiters
$zp_citation['citation'] = preg_replace('/(doi:[^ <]*)/',
'<b>' . '$1' . " - where did doi go?" . '</b>',
$zp_citation['citation'], 1);https://stackoverflow.com/questions/20737101
复制相似问题