java正则: 忽略大小写匹配


import java.util.regex.Matcher; import java.util.regex.Pattern; import com.sun.org.apache.xerces.internal.impl.xpath.regex.CaseInsensitiveMap; public class test { public static void main(String[] args) { String str = "java JavA ABC"; Pattern test_ = Pattern.compile("java",Pattern.CASE_INSENSITIVE); Matcher result_ = test_.matcher(str); str = result_.replaceAll("Perl6"); System.out.println(str); } }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM