标签:util 字符串 src 正则表达 boolean inf div mamicode bsp
import java.util.regex.*; class RegexExample1{ public static void main(String args[]){ String content = "I am noob " + "from runoob.com."; String pattern = ".*runoob.*"; boolean isMatch = Pattern.matches(pattern, content); System.out.println("字符串中是否包含了 ‘runoob‘ 子字符串? " + isMatch); } }
正在更新中..........
标签:util 字符串 src 正则表达 boolean inf div mamicode bsp
原文地址:https://www.cnblogs.com/tszr/p/10960443.html