code: private static String getTemplateMarker(String str) throws IllegalStateException{
  		Pattern p = Pattern.compile("\\{\\{(.*?)\\}\\}", Pattern.DOTALL);
  		Matcher matcher = p.matcher(str);
  		String tpl = null;
  		while(matcher.find())
  		{
  		    if(tpl!=null){
  		    	throw new IllegalStateException("More than one template in the sentence.");
  		    }
  			tpl=matcher.group(1);
  		}
  		return tpl;
  
  	}
docs: Returns the template marker of the sentence.
  
  Assumes hat a sentence has only ONE marker.
  If the sentence contains more than one template, an IllegalStateException
  is thrown.
  
  If the String does not contain a marker, null is returned
  
  
  @param str A string with template markers
  @return the template marker