The motion of two immiscible liquids in a capillary tube is analysed, theoretically and numerically, for the case in which a residual film confines the displacing liquid to the core of this tube. The theoretical analysis has shown that the three flow regimes predicted by Taylor (J. Fluid Mech., vol. 10, 1961, pp. 161–165), for the case of gas-displacement, can only be achieved when the ratio of the viscosity of the displaced fluid to that of the displacing one is greater than 2. An elliptic mesh generation technique, coupled with the Galerkin finite-element method, is used to compute the velocity field and the configuration of the interface between the two fluids. A map of cases in the Cartesian space defined by the capillary number (Ca) and the viscosity ratio (Nμ) is constructed in order to locate the different flow patterns the problem exhibits. The critical capillary number at which the flow enters the transition range between the bypass regime and the full-recirculating one is given. While a decrease of the fraction of mass attached to the wall is achieved by decreasing Ca or increasing Nμ, bypass flow patterns are formed as a consequence of high values of the capillary number and viscosity ratio.