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.
以下の文字列から「MY WEIGHT」を突き合わせてみました。私は正規表現の一致を行うために Java の String クラスを使用しています。
String line = "MY WEIGHT:200"; String s = "^(MY WEIGHT)."; line.matches(s);
しかし、それは常に false を返します。それから試してみs="MY WEIGHT"ましたが、うまくいきません。ここで何が問題なのですか?
s="MY WEIGHT"