added intelligent <p> regex and early stage warning