private boolean correctSyntax(String format, String assemblyLine, ArrayList<String> relevantOperands) {

		String[] formatSplit = format.split("\\s+");
		int noOfTokens = formatSplit.length;

		String regex = ".*";

		int i = 1;
		int i2 = 0;

		for (String str : formatSplit) {
			
			if(i > 1 && i <= noOfTokens)
				regex += "\\s+";
			
			String[] strSplit = str.split("((?=^[,]*)|(?<=^[,]*))|((?=[,]*$)|(?<=[,]*$))");
			
			for(String str2: strSplit){				
				if(!str2.isEmpty()){					
					if(str2.equals(","))
						regex += ",";				
					else{								
						regex += "("+ Pattern.quote(relevantOperands.get(i2))+")";
						i2++;
					}					
				}
			}			
			i++;
		}	

		boolean legitSyntax = Pattern.matches(regex, assemblyLine);

		return legitSyntax;
	}