function areFlagsEqual(flagsA, flagsB) {
			return [...flagsA].sort().join("") === [...flagsB].sort().join("");
		}
Checks whether two given regex flags contain the same flags or not.
@param {string} flagsA The regex flags.
@param {string} flagsB The regex flags.
@returns {boolean} True if two regex flags contain same flags.