import gnu.regexp.*;

public class Example {

    static void main(String[] args) throws gnu.regexp.REException {
	if (args.length!=1) {
	    System.out.println("Usage: java Example string\nTests whether 'string' ends with bla");
	    System.exit(1);
	} else {
	    RE e = new RE("bla$");
	    if (e.getMatch(args[0]) == null) {
		System.out.println("The string does not end by 'bla'");
	    } else {
		System.out.println("The string ends by 'bla'");
	    }
	}
    }
}
