In this example we will use a regular expression to replace html heading elements. We showed a similiar example in the how to modify html response tutorial. Below we defined a snippet of html with <h2> and wrote a regular expression to replace it with a new html tag. The <h2> could be replaced with a <h1>, <h3> <h4> or <h5>.