public void setAlphabet(String regex) {
		int i = 0;
		for (char c = regex.charAt(i); i < regex.length(); i++) {
			if (c == '[') {
				break;
			}
		}
		if (i >= regex.length()) {
			throw new IllegalArgumentException("Regex may only contain a group");
		}
		
		for (char c = regex.charAt(i); i < regex.length(); i++) {
			if (c == ']') {
				break;
			}
		}
		if (i < regex.length()) {
			throw new IllegalArgumentException("Regex may only contain a group");
		}
		
		alphabet = new Revex(regex);
	}