FileDocCategorySizeDatePackage
REmatchTwoFields.javaAPI DocExample548Sat Apr 28 10:22:34 BST 2001None

REmatchTwoFields

public class REmatchTwoFields extends Object

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

		String inputLine = "Adams, John Quincy";
		// Construct an RE with parens to "grab" both field1 and field2
		RE r = new RE("(.*), (.*)");
		if (!r.match(inputLine))
			throw new IllegalArgumentException("Bad input");
		System.out.println(r.getParen(2) + ' " + r.getParen(1));