"); document.body.innerHTML = newText; -----------------------------------------------------------------------------------------------------"> "); document.body.innerHTML = newText; -----------------------------------------------------------------------------------------------------"> "); document.body.innerHTML = newText; -----------------------------------------------------------------------------------------------------">
<script>
function toSentenceCase(str) {
return str.replace(/([A-Z]+)/g, function(match) {
return match.charAt(0) + match.slice(1).toLowerCase();
});
}
let bodyText = document.body.innerHTML;
let newText = toSentenceCase(bodyText);
document.body.innerHTML = newText;
</script>
<script> let bodyText = document.body.innerHTML; let newText = bodyText.replace(/([.?!])\s*/g, "$1<br>"); document.body.innerHTML = newText;
</script>