FileDocCategorySizeDatePackage
RESimple.javaAPI DocExample557Fri Feb 27 20:14:12 GMT 2004None

RESimple

public class RESimple extends Object
Simple example of using RE class.
author
Ian F. Darwin, http://www.darwinsys.com/
version
$Id: RESimple.java,v 1.4 2004/02/28 02:14:11 ian Exp $

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

		String pattern = "^Q[^u]\\d+\\.";
		String input = "QA777. is the next flight. It is on time.";

		Pattern p = Pattern.compile(pattern);

		boolean found = p.matcher(input).lookingAt();

		System.out.println("'" + pattern + "'" +
			(found ? " matches '" : " doesn't match '") + input + "'");