Alright, here's my current test function:
function make_void( str )
{
var str_arr = str.split( /[\W]+/ );
var voidstr;
var newstr = "";
for ( var i = 0; i < str_arr.length; i++ )
{
voidstr = str_arr[i];
// if ( Math.random() <= 0.9 )
// {
voidstr = voidstr.replace( /\w/gi, "?" );
// }
newstr += voidstr + " ";
}
document.writeln( newstr );
}
The problem? Punctuations is lost.
What's a good way to revise that such that they aren't?