We study the flow of two immiscible, Newtonian fluids in a periodically constricted tube driven by a constant pressure gradient. Our volume-of-fluid algorithm is used to solve the governing equations. First, the code is validated by comparing its predictions to previously reported results for stratified and pulsing flow. Then, it is used to capture accurately all the significant topological changes that take place. Initially, the fluids have a core-annular arrangement, which is found to either remain the same or change to a different arrangement depending on the fluid properties, the pressure driving the flow, or the flow geometry. The flow-patterns that appear are the core-annular, segmented, churn, spray, and segregated flow. The predicted scalings near pinching of the core fluid concur with similarity predictions and earlier numerical results [I. Cohen et al., “Two fluid drop snap-off problem: Experiments and theory,” Phys. Rev. Lett. 83, 1147–1150 (1999)]. Flow-pattern maps are constructed in terms of the Reynolds and Weber numbers. Our result provides deeper insights into the mechanism of the pattern transitions and is in agreement with previous studies on core-annular flow [Ch. Kouris and J. Tsamopoulos, “Core-annular flow in a periodically constricted circular tube, I. Steady state, linear stability and energy analysis,” J. Fluid Mech. 432, 31–68 (2001) and Ch. Kouris et al., “Comparison of spectral and finite element methods applied to the study of interfacial instabilities of the core-annular flow in an undulating tube,” Int. J. Numer. Methods Fluids 39(1), 41–73 (2002)], segmented flow [E. Lac and J. D. Sherwood, “Motion of a drop along the centreline of a capillary in a pressure-driven flow,” J. Fluid Mech. 640, 27–54 (2009)], and churn flow [R. Y. Bai et al., “Lubricated pipelining—Stability of core annular-flow. 5. Experiments and comparison with theory,” J. Fluid Mech. 240, 97–132 (1992)].