The following code is taken from Jon Resig's book Secrets of JavaScript Ninja
var html = "<div class='test'><b>Hello</b> <i>world!</i></div>"; var results = html.match(/<(\/?)(\w+)([^>]*?)>/); I want to understand the meaning of the first capture (within the parenthesis) ie (\/?).