Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试制作一个与此字符串中包含单词“log in”的单词“register”不匹配的正则表达式
"active active">Log in / Register</a> "active active">Register / log in</a>
但会匹配这个
"active active">Register</a> "active active">siteRegister</a>
可以制作正则表达式..?只需尝试近 3 小时..如果您能提供帮助,请不胜感激
尽管我认为将正则表达式用于此类事情是个坏主意,但您应该尝试一下:
"active active">\w*Register\w*<\/a>