Supporting Borodin's comment, you shouldn't use regex to parse html since you can face parse issues. You can use regex to parse simple tags like you have but this can be easily broken if you have text with embedded tags like <a asdf<as<asdf>df>>, in this case the regex will wronly match the tag a
The idea behind this regex is to force tags to have at least one attribute
Post a Comment for "Extract An HTML Tag Name From A String"