function getStringBetweenDots(str) {
const matches = str.match(/.(.*?)./);
return matches ? matches[1] : null;
}
// 示例使用
const exampleStr = “demo1.thisTheString.demo2”;
const result = getStringBetweenDots(exampleStr);
console.log(result); // 输出: thisTheString