Regex for matching Setext-style headers
%r{ (.+) # The title text ($1) \n ([\-=])+ # Match a line of = or -. Save only one in $2. [ ]*\n+ }x
<code/>
<pre/>
<code/>and<pre/>for code samples.