static function MergeRegEx($template, $values, $ldelim = "{{", $rdelim = "}}")
	{
		self::$_MERGE_TEMPLATE_VALUES = $values;
		
		if ($ldelim != "{{" || $rdelim != "}}") throw new Exception("Custom delimiters are not yet implemented. Sorry!");
		
		$results = preg_replace_callback('!\{\{(\w+)\}\}!', 'SimpleTemplate::_MergeRegExCallback', $template);
		
		self::$_MERGE_TEMPLATE_VALUES = null;
		
		return $results;
		
	}
static function MergeRegEx($template, $values, $ldelim = "{{", $rdelim = "}}")
	{
		self::$_MERGE_TEMPLATE_VALUES = $values;
		
		if ($ldelim != "{{" || $rdelim != "}}") throw new Exception("Custom delimiters are not yet implemented. Sorry!");
		
		$results = preg_replace_callback('!\{\{(\w+)\}\}!', 'SimpleTemplate::_MergeRegExCallback', $template);
		
		self::$_MERGE_TEMPLATE_VALUES = null;
		
		return $results;
		
	}
static function MergeRegEx ( $ template , $ values , $ ldelim = "{{" , $ rdelim = "}}" ) { self :: $ _MERGE_TEMPLATE_VALUES = $ values ; if ( $ ldelim != "{{" || $ rdelim != "}}" ) throw new Exception ( "Custom delimiters are not yet implemented. Sorry!" ) ; $ results = preg_replace_callback ( '!\{\{(\w+)\}\}!' , 'SimpleTemplate::_MergeRegExCallback' , $ template ) ; self :: $ _MERGE_TEMPLATE_VALUES = null ; return $ results ; }
Used internally by Merge, or may be called directly.
If a placeholder is in the template but there is no matching value,
it will be replaced with empty string and will NOT appear in the output.

@param string $template string with placeholder variables
@param mixed (array or object) $values an associative array or object with key/value pairs
@param string the left (opening) delimiter for placeholders. default = {{
@param string the right (closing) delimiter for placeholders. default = }}
@return string merged template
Used internally by Merge or may be called directly . If a placeholder is in the template but there is no matching value it will be replaced with empty string and will NOT appear in the output .