revise the regex to avoid printing empty paragraph '<p></p>' on the page