Edit in JSFiddle
JavaScript
Result
var str = '<H1>Chapter 1 – Introduction to Regular Expressions</H1>'; alert(/<.*>/.exec(str));