titleTransform (title, titleReplace) {
		let transformedTitle = title;
		for (let tr in titleReplace) {
			let transform = titleReplace[tr];
			if (typeof transform === "object") {
				if (typeof transform.search !== "undefined" && transform.search !== "" && typeof transform.replace !== "undefined") {
					let regParts = transform.search.match(/^\/(.+)\/([gim]*)$/);
					let needle = new RegExp(transform.search, "g");
					if (regParts) {
						// the parsed pattern is a regexp with flags.
						needle = new RegExp(regParts[1], regParts[2]);
					}

					let replacement = transform.replace;
					if (typeof transform.yearmatchgroup !== "undefined" && transform.yearmatchgroup !== "") {
						const yearmatch = [...title.matchAll(needle)];
						if (yearmatch[0].length >= transform.yearmatchgroup + 1 && yearmatch[0][transform.yearmatchgroup] * 1 >= 1900) {
							let calcage = new Date().getFullYear() - yearmatch[0][transform.yearmatchgroup] * 1;
							let searchstr = `$${transform.yearmatchgroup}`;
							replacement = replacement.replace(searchstr, calcage);
						}
					}
					transformedTitle = transformedTitle.replace(needle, replacement);
				}
			}
		}
		return transformedTitle;
	}
Transforms the title of an event for usage.
Replaces parts of the text as defined in config.titleReplace.
@param {string} title The title to transform.
@param {object} titleReplace object definition of parts to be replaced in the title
                object definition:
                   search: {string,required} RegEx in format //x or simple string to be searched. For (birthday) year calcluation, the element matching the year must be in a RegEx group
                   replace: {string,required} Replacement string, may contain match group references (latter is required for year calculation)
                   yearmatchgroup: {number,optional} match group for year element
@returns {string} The transformed title.