Guest User

Untitled

a guest
Dec 9th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. var str = "<div class=prw_rup prw_reviews_text_summary_hsx data-prwidget-name=reviews_text_summary_hsx data-prwidget-init=handlers>
  2. <div class=entry><p class=partial_entry>You have to try their special sushi rolls like acevichado or patrullero. They have great selections of sushi and other dishes.</p>
  3. </div></div><div class=prw_rup prw_reviews_text_summary_hsx data-prwidget-name=reviews_text_summary_hsx data-prwidget-init=handlers><div class=entry><p class=partial_entry>
  4. All you can eat sushi fir $20 ($24 including tax)! Christian, our server, was wonderful and attentive.
  5. </p></div></div><div class=prw_rup prw_reviews_text_summary_hsx data-prwidget-name=reviews_text_summary_hsx data-prwidget-init=handlers>
  6. <div class=entry><p class=partial_entry>The place was good, also the waiters, but definitely sushi is the best in town
  7. for my opinion, even with the few options of it in this place. I will be there soon again.</p></div></div>";
  8.  
  9. - You have to try their special sushi rolls like acevichado or patrullero. They have great selections of sushi and other dishes.
  10.  
  11. - All you can eat sushi fir $20 ($24 including tax)! Christian, our server, was wonderful and attentive.
  12.  
  13. - The place was good, also the waiters, but definitely sushi is the best in town for my opinion, even with the few options of it in this place. I will be there soon again.
  14.  
  15. var temp = "<p class=partial_entry";
  16. var res = str.split('>');
  17. var res2 = res.indexOf(temp) + 1;
  18. var resultado = null;
  19.  
  20. if (res2 < res.length && res2 != -1) {
  21. resultado = res[ res2 ]; // gets the next one
  22. }
  23.  
  24. alert(resultado);
  25.  
  26. const commentNodes = document.getElementsByClassName('partial_entry');
  27. const comments = commentNodes.map(node => node.innerText);
Add Comment
Please, Sign In to add comment