const regex = /({|,)?\s*'?([A-Za-z_$\.][A-Za-z0-9_ \-\.$]*)'?\s*:\s*/g;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('({|,)?\\s*\'?([A-Za-z_$\\.][A-Za-z0-9_ \\-\\.$]*)\'?\\s*:\\s*', 'g')
const str = `category: ARTS, name: 아트리스케이프, address: 서울 서대문구 신촌로3나길 7-15, geolatitude: 37.5595064, geolongitude: 126.9303036, brief: 다양한 문화울의 경험과 정보를 공유하고 소통하는 소셜 아트플랫폼 , phone: 02-325-1235, email: hello@artrescape.com , url: artrescape.com/, tag: 예술`;
const subst = `"$1 "$2": "`;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions