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.
我想使用正则表达式检查给定的字符串,如果任何单词包含例如q-w字符,那么一定不能包含ı-ş字符。
q-w
ı-ş
given string = > abc qşl def , not matches given string = > abc qsl def , matches
最好的问候, HH
尝试这个:
^[^ı-ş]*[q-w][^ı-ş]*$|^[^q-w]*$
这是一个演示。你是这个意思吗?