Reputation: 23
I need to fing all "table" tags on page with attribute border on the page using Regular Expressions on JavaScript.
How can I do it?
P.S. Please, don't propose me any JQuery (or similar) solutions.
Upvotes: 0
Views: 91
Reputation: 3580
you can use regex object like this to match table which has border.
myTableElement.match(/<table.*?border.*?>.*?<\/table>/gi)
or like this
var x = new RegExp(/<table.*?border.*?>.*?<\/table>/gi)
myTableElement.match(x);
Upvotes: -1