JavaScript 正则表达式

如何用JavaScript的正则表达式取出字符串中第一个逗号前的内容


const str = "hello, world, how, are, you";

const match = str.match(/^([^,]+),/);

console.log(match[1]);  // hello