var trunc='Dr. Sherwood has been practicing for four decades, and he\'s been denied admitting privileges in the Rio Grande Valley.'; function getLeadingHtml (input, maxChars) { var token = /\w+|[^\w<]|<(\/)?(\w+)[^>]*(\/)?>|"; return output; }; trunc = getLeadingHtml(trunc,47) trunc=(trunc+'...'); document.write('
');