html_string "<span class=\"verse\"><strong>1<\/strong>\u00a0hello world how are you?,<span class=\"trans\" title=\"\u00a0Greek brothers.\">t<\/span> I am fine thank you.<\/span><span class=\"verse\"><strong>2<\/strong>\u00a0this world is very bad.<\/span><span class=\"verse\"><strong>3<\/strong>\u00aall me are good,<\/span>"
Ich will nur den Text innerhalb der Spanne extrahieren, die Klasse Vers hat und es soll nicht Text von Spannweite mit Klasse trans umfasst.Extrakt Text aus HTML-String mit jquery
Das Ergebnis muss in Array-Form vorliegen.
von oben Zeichenfolge muss ich so
["\u00a0hello world how are you? I am fine thank you","\u00a0this world is very bad.","\u00aall me are good,"]
Dank
Und die obligatorische Demo: http://jsfiddle.net/rWYzb/ –