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.
Javaで正規表現が機能する方法にこだわっています...なぜJavaの正規表現パターンで
(\\w+)(\\s{1})is not (\\w+)
両方に一致します:
mary is not tall mary ann is not tall
mary is not tall
mary ann is not tall
名前が一度だけ表示されるようにパターンを変更するにはどうすればよいですか。たとえば、私が欲しいのは次のとおりです。
name+ " "+"is"+" "+"not"+" "+"tall"