Elasticsearch 6.2.4
我想使用custom type field映射创建索引。
尝试使用文档中的示例创建索引:
.replace(/(?<=[\(|\[])\s+|\s+(?=[\]|\)])/g, '');
出现错误:
const currentString = 'This is ( a sample ) [ string ] to play with';
const regex = /(?<=[\(|\[])\s+|\s+(?=[\]|\)])/g;
console.log(currentString.replace(regex, ''));