Extract common format code