Change Content - Javascript
Change html element content using pure javascript author(s): Deepu Mohan Puthrote (WarFox)
JavaScript
const paragraph = 'The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?';
// any character that is not a word character or whitespace
const regex = /[^\w\s]/g;
console.log(paragraph.search(regex));
console.log(paragraph[paragraph.search(regex)]);