Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script>
  4. $( document ).ready(function() {
  5. for(var i=0;i<2;i++)
  6. {
  7. var remove_dot=document.getElementsByTagName("p")[i];
  8. var remove=remove_dot.innerHTML;
  9. remove_dot.innerHTML = remove.replace(/[,|.-]+[&nbsp;]*([,|.-])/g, "$1");
  10. }
  11. });
  12. </script>
  13. <body>
  14. <p>hello , . are you | . why , its ok , .</p>
  15. <p>hey , . are you | . why | its ok , .</p>
  16. </body>
  17.  
  18. hello . are you . why , its ok .
  19. hey . are you . why | its ok .
  20.  
  21. hello . are you . why and its ok .
  22. hey . are you . why & its ok .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement