I’m trying to verify my code.
Here is a regex check on it with out 0xa:

As you can see at some places where there is a return character the regex does not match b.c. 0xa is used for the return character.
Here is a regex check inlcuding 0xa:

As you can see it is all included.
In short my .js includes these characters:
[\x0a\x20-\x7e]
However I am concerned as to why it sometimes uses a return as:
\\ the other return character ( have not verified yet )
and sometimes it uses a return as:
\x0a
Related
I was surprised that it look like it groups the rows together, but it has to do with the star in your regexp. Change your regexp to
[\x20-\x7e]+. Using the plus sign (one or more matches) instead of star (zero or more matches) I think you get the expected result.If you want to see whats really is in the inputText-field on regexpal, open up the console in your browser and run
document.getElementById('inputText').value.replace(/[^\x20-\x7e]/g,function(a){a = a.charCodeAt(0).toString(16); return '\\u0000'.slice(0,6-a.length) + a;});and you will get a true representation of the string.Pretty print: