Fix regex to not consider semi-colons full-stop characters due to their
use in entity encoding.