For example I have a string that looks like the following:
var example_string = "this is the example string\n <-don't want \n\n\n";
Here I've made a string that has four newline characters in it, with three consecutive on the end. How can I programmatically have javascript tell me that there are 3 newline characters on the end?