extract the Pattern
reformat
cleanup return