Guest User

Untitled

a guest
Jun 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. </?(?:(?!pb)[^>])*>
  2.  
  3. < # "<"
  4. /? # optional "/"
  5. (?: # don't capture group
  6. (?! # a position not followed by...
  7. pb # "p" and a word bounday
  8. )
  9. [^>]* # any char but ">"
  10. )* # as often as possible
  11. > # ">"
  12.  
  13. <p class="foo" title="unusual < title">
  14. ---------
  15.  
  16. var html = '<img src=""><p>content</p><span style="color: red">content</span>';
  17. html.replace(/<(?!s*/?s*pb)[^>]*>/gi,'')
Add Comment
Please, Sign In to add comment