为了账号安全,请及时绑定邮箱和手机立即绑定

求java大神用正则表达式方法分割此英语短文

求java大神用正则表达式方法分割此英语短文

a黄金罗奇 2016-05-07 21:00:04
Failure is probably the fortification in your pole. It is like a peek your wallet as the thief, when you are thinking how to spend several hard-won lepta, when you are wondering whether new money, it has laid background. Because of you, then at the heart of the most lax, alert, and most low awareness, and left it godsend failed.//split.("__________________________________");求解!!!
查看完整描述

2 回答

已采纳
?
qq_青枣工作室_0

TA贡献446条经验 获得超754个赞

public class Main {
	public static void main(String[] args) {
		String str = "Failure is probably the fortification in your pole. It is like a peek your wallet as the thief, when you are thinking how to spend several hard-won lepta, when you are wondering whether new money, it has laid background. Because of you, then at the heart of the most lax, alert, and most low awareness, and left it godsend failed.";
		
		String[] words = str.split("[^\\w\\-]+");
		for(String w : words) {
			System.out.println(w);
		}
	}
}


查看完整回答
1 反对 回复 2016-05-07
  • 2 回答
  • 0 关注
  • 1850 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号