FileDocCategorySizeDatePackage
PatternConvenience.javaAPI DocExample529Fri May 09 15:25:50 BST 2003None

PatternConvenience

public class PatternConvenience extends Object
PatternConvenience -- demonstrate java.util.regex.Pattern convenience routine
author
Ian F. Darwin
version
$Id: PatternConvenience.java,v 1.1 2003/05/09 19:25:50 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)


		String pattern = ".*Q[^u]\\d+\\..*";
		String line = "Order QT300. Now!";
		if (Pattern.matches(pattern, line)) {
			System.out.println(line + " matches \"" + pattern + "\"");
		} else {
			System.out.println("NO MATCH");
		}