Code /* RegEx1.java David Klick 2005-03-30 Demonstrates regular expression use. */ import java.util.regex.*; public class RegEx1 { public static void main(String[] args) { String[] sarr = { "I do not like green eggs and ham", "I do not like them Sam I am", "I do not like them here or there", "I do not like them anywhere", "Imagine", "whatever", "One fish", "Two fish", "Red fish", "Blue fish" }; Pattern p = Pattern.compile("^I.*e$"); Matcher m; System.out.println(p.pattern()); for (int i=0; i