Redian新闻
>
wrong!!! Re: 有没有 replaceall for String?
avatar
wrong!!! Re: 有没有 replaceall for String?# Java - 爪哇娇娃
l*r
1
But you are wrong. The regular expression has a number of predefined
string/chars that you can NOT use.
Take a simple example:
String t1="FREE Tech Newsletters, Instant Messaging Planet Text, ");
t1=t1.toLowerCase();
String t2=t1.replaceAll(", .", ". ");
System.out.println(t2);
this will result in:
FREE Tech Newsletters. nstant Messaging Planet Text.
(the correct results one would expect --- if according to what you said,
should be the same string as t1.)
The problem is: we want to replace a sub
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。