I\'m using the following regex
^[a-zA-Z0-9\\\',!;\\?\\$\\^:\\\\\\/`\\|~&\\\" @#%\\*\\{}\\(\\)_\\+\\.\\s=-]{1,1000}$
I know it\'s ugly,
This solution fixed my problem while replacing br tag to '\n' .
alert(content.replace(//g,'\n'));