Guest User

Untitled

a guest
May 8th, 2012
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. jQuery placeholders substitution
  2. [$[SKU001]$]
  3. [$[SKU002]$]
  4.  
  5. <img src="SKU001.jpg">
  6. <img src="SKU002.jpg">
  7.  
  8. var pattern = /[$[(.*?)]$]/;
  9. var t = $('body').filter(function() {
  10. return this.??.match(pattern);
  11. });
  12.  
  13. console.log(t);
  14.  
  15. var matches = $('body').text().match(/[$[(.*?)]$]/)
  16. console.log(matches);
Advertisement
Add Comment
Please, Sign In to add comment