private void parseRegex(String regex) //a-z, ^0, A-Z
	{
		int strLen = regex.length();
		if(regex.startsWith("^")) //is a not
		{
			
			for(int i = 1; i < strLen; i++)
			{
				if(regex.length() > i + 2 && regex.charAt(i+1) == '-') //fits a-z pattern
				{
					for(int j = regex.charAt(i); j <= regex.charAt(i+2); j++) //ignore - char
					{
						legal.remove(String.valueOf((char)j));
					}
					i += 2; //account for extra char's used in pattern.
				}
				else //single char
				{
					char toRemove = regex.charAt(i);
					String strToRemove = String.valueOf(toRemove);
					legal.remove(strToRemove);
				}
				
			}
		}
		else // normal regex, not a not.
		{
			for(int i = 0; i < strLen; i++)
			{
 				if(regex.length() > i + 2 && regex.charAt(i+1) == '-') //fits a-z pattern
				{
					for(int j = regex.charAt(i); j <= regex.charAt(i+2); j++) //ignore - char
					{
						legal.add(String.valueOf((char)j));
					}
					i += 2; //account for extra char's used in pattern.
				}
				else //single char
				{
					legal.add(String.valueOf(regex.charAt((char)i)));
				}
				
			}
		}
	}