如何建立正则表达式匹配的字符串不包含" AU = 1"? [英] How can I build the regex to match a string NOT containing "au=1"?

查看:85
本文介绍了如何建立正则表达式匹配的字符串不包含" AU = 1"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说...:)

As the title says... :)

你能不能帮我建立一个正则表达式匹配不含有字符串AU = 1?

Could you help me to build a regex to match a strings NOT containing "au=1"?

我在玩负向前查找,没有运气,但我敢肯定,我应该使用该得到的东西。

I was playing with negative lookahead with no luck but I'm quite sure that I should get something using that.

谢谢!

推荐答案

我终于用这个正则表达式做了

I finally did it with this regexp

^(?!.*au=1).*$

这篇关于如何建立正则表达式匹配的字符串不包含" AU = 1"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆