JSFiddle - React, Tailwind, and code Playground
JavaScript
var re = /(?!Mrs?\.|Jr\.|Dr\.|Sr\.|Prof\.)(\b\S+[.?!]["']?)\s/g;
var str = 'I works just fine for my purpose but now I need the exact same regex in Javascript? (to make sure that the outputs are consistent) and I\'m struggling to translate Mr. this Python regex. Into one compatible with Javascript. "What with Quoting?" Another sentence. \n';
var subst = '$1#';
var result = str.replace(re, subst).split(/#/);
alert(result);