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.
次の例のような文字列があります。
US Latina Calcio v AS Varese 1910
正規表現を使用して、この文字列を 2 つの文字列に分割したいと思います。セパレーターを作りたい: "whitespace"+"v"+"whitespace".
"whitespace"+"v"+"whitespace"
私はそのように試みましたが、うまくいきません:
buffer = match.split("\\sv\\s");
パターン クラスとマッチャー クラスを使用してみてください。正規表現に関しては、より便利です。\sv\s として式を使用します。お役に立てれば。