/* 来 自 时 代 J a v a - N o w J a v a . c o m*/
public class Main {
public static void main(String[] args) throws Exception {
String str = "";
str = "I love Java 8!";
boolean result = str.matches("I love .*[ 0-9]!");
System.out.println(result);
// The following String also matches.
str = "I love Jython 2.5.4!";
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。