getRegExpFlags = regExp => {
    let flags = '';

    if (regExp.global) {
      flags += 'g';
    }

    if (regExp.ignoreCase) {
      flags += 'i';
    }

    if (regExp.multiline) {
      flags += 'm';
    }

    if (regExp.unicode) {
      flags += 'u';
    }

    if (regExp.sticky) {
      flags += 'y';
    }

    return flags;
  }
@function getRegExpFlags

@description
get the flags to apply to the copied regexp

@param regExp the regexp to get the flags of
@returns the flags for the regexp