/**
 * 提取 {{}} 中的 key
 * @param text
 * @returns
 */
export function extractKeysFromBraces(text: string) {
  const regex = /\{\{\s*(.*?)\s*\}\}/g;
  const keys: string[] = [];
  let matches: RegExpExecArray | null;

  while ((matches = regex.exec(text)) !== null) {
    keys.push(matches[1]); // 获取{{}}中间的key
  }

  return keys;
}
