function cloneRegexp(re) {
  var pattern = re.source;
  var flags = '';
  if (re.global) flags += 'g';
  if (re.multiline) flags += 'm';
  if (re.ignoreCase) flags += 'i';
  if (re.sticky) flags += 'y';
  if (re.unicode) flags += 'u';
  return new RegExp(pattern, flags);
}
Function cloning the given regular expression. Supports `y` and `u` flags
already.

@param  {RegExp} re - The target regular expression.
@return {RegExp}    - The cloned regular expression.