匹配以开头但不包括的字符串的正则表达式

我正在尝试构建一个正则表达式,它可以匹配任何以"form submit success mail“开头但不包含数字306的字符串

到目前为止,我得到的是:/^(?i)(表单提交成功邮件(?!/(306).*/gm

3个字符串示例:

form submit success mail - 306 - how are you today
form submit success mail - 2019 - this is a test
form submit success mail - 675 - what the

查询应该匹配后两个字符串,而不是第一个字符串。

在https://regex101.com/中测试,但似乎不起作用-感谢任何帮助。

转载请注明出处:http://www.intrusion-fire.net/article/20230526/2019161.html