* @param $replace String: replacement string. May contain $1, which will be
* replaced by the text between the delimiters
* @param $subject String to search
+ * @param $flags String: regular expression flags
* @return String: The string with the matches replaced
*/
static function delimiterReplace( $startDelim, $endDelim, $replace, $subject, $flags = '' ) {