I have this html string x:
Michelle Brook
<br></br>
The Content Mine
<br></br>
michelle@contentmine.org
It is taken from first lines of http://www.dlib.org/dlib/november14/brook/11brook.html
I would like to obtain x.substring(0,14)=Michelle Brook
.
The problem is that before the M, there are two special characters (unicode code=10) that makes x.substring(0,14)=Michelle Bro
.
In fact, using x.split("")
i can see {" "," ","M",.....}
I wouldn't remove these characters.
I would like to make substring
doing the right thing "keeping in mind" that special characters. How could i do? Is there a different javascript function that makes that?