regex matiching improvements plus margin reset for p
message printing improvements