标签: php regex
我尝试在没有拖尾指定单词的情况下隐藏字符串。这个词最后可以包含一个数字[0-9] +。
test test [match] test test_word [not match] test test_word9 [not match] test test_word132 [not match]
以下正则表达式仅适用于_word或_word1 ... _ word9
.*(?<!_word|_word[0-9])$
有什么建议吗?