FileDocCategorySizeDatePackage
CaseMatch.javaAPI DocExample718Wed Feb 28 18:56:02 GMT 2001None

CaseMatch

public class CaseMatch extends Object
Show case control using RE class.
author
Ian F. Darwin, ian@darwinsys.com
version
$Id: CaseMatch.java,v 1.2 2001/02/28 23:56:02 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, RE.MATCH_CASEINDEPENDENT);

		boolean found;
		found = r.match(input);			// will match any case
		System.out.println("MATCH_CASEINDEPENDENT match " + found);

		r.setMatchFlags(RE.MATCH_NORMAL);
		found = r.match(input);		// will match case-sensitively
		System.out.println("MATCH_NORMAL match was " + found);