I want to find the number <li>s present inside a JavaScript string.
For eg. if,
var lis = "`<ul><li><a href='http://sitename/profile/udhayakumar'>udhayakumar</a></li><li><a href='http://sitename/profile/lovely'>lovely</a></li></ul>`";
Then how to find the number of <li>s inside the <ul> tag. Is it possible to get this without inserting into any DOM element.
If you have jquery, you can do like this