// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.regex.*;

public class AZTest {
   private static Pattern p = Pattern.compile("[a-z]+");
   public static boolean isAZ(String s) {
      return p.matcher(s).matches();
   }
   private static void test(String s) {
      System.out.println(s + " " + isAZ(s));
   }
   public static void main(String[] args) {
      test("abc");
      test("ABC");
      test("abcABCabc");
      test("ABCabcABC");
   }
}
