FileDocCategorySizeDatePackage
RESimple.javaAPI DocExample583Tue Feb 27 18:30:10 GMT 2001None

RESimple

public class RESimple extends Object
Simple example of using RE class.
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: RESimple.java,v 1.1 2001/02/27 23:30:10 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.";

		RE r = new RE(pattern); // Construct an RE object

		boolean found = r.match(input); // Use it to match an input.

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