【发布时间】:2011-06-20 18:58:54
【问题描述】:
我需要使用 preg_match 来检查一行是否以 /> 或 /> 结尾
我创建了一个函数,其中包含以下行
if (!preg_match('\/>$', $str)) {
但它不起作用,因为它带有这个错误
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash
我怎样才能让它工作?
【问题讨论】:
标签: php regex tags preg-match