src/vs/base/common/strings.ts/regExpFlags
export function regExpFlags(regexp: RegExp): string {
	return (regexp.global ? 'g' : '')
		+ (regexp.ignoreCase ? 'i' : '')
		+ (regexp.multiline ? 'm' : '')
		+ ((regexp as any /* standalone editor compilation */).unicode ? 'u' : '');
}