We study the interfacial evolution of immiscible two-phase flow within a capillary tube in the partial wetting regime using direct numerical simulation. We investigate the flow patterns resulting from the displacement of a more viscous fluid by a less viscous one under a wide range of wettability conditions. We find that beyond a wettability dependent critical capillary number, a uniform displacement by a less viscous fluid can transition into a growing finger that eventually breaks up into discrete blobs by a series of pinch-off events for both wetting and nonwetting contact angles. This study validates previous experimental observations of pinch-off for wetting contact angles and extends those to nonwetting contact angles. We find that the blob length increases with the capillary number. We observe that the time between consecutive pinch-off events decreases with the capillary number and is greater for more wetting conditions in the displaced phase. We further show that the blob separation distance as a function of the difference between the inlet velocity and the contact line speed collapses into two monotonically decreasing curves for wetting and nonwetting contact angles. For the phase separation in the form of pinch-off, this work provides a quantitative study of the emerging length and timescales and their dependence on the wettability conditions, capillary effects, and viscous forces.