-3
這裏是我的問題描述,我想在java字符串的段落中找到給定的模式?
String str="We may use the name you provide for your Google Profile across all of the services we offer that require a Google Account. In addition, we may replace past names associated with your Google Account so that you are represented consistently across all our services. If other users already have your email, or other information";
現在,
String pat="we offer";
,所以我需要找到字符串「海峽」模式「拍」,也是我需要的話用同樣的模式開始...就像「我們可能」,「和你一起......」等等。
幫助你什麼?用現成的代碼? – Maroun
嘗試使用String.split()方法..並張貼您發佈問題時發佈的內容 – prasadmadanayake