Let’s say we want to truncate long strings (length > 250): short = long.replace(/(.{250})..+/, “$1…”); or short = long.replace(/(.{250})..+/, “$1…”);
Let’s say we want to truncate long strings (length > 250): short = long.replace(/(.{250})..+/, “$1…”); or short = long.replace(/(.{250})..+/, “$1…”);