Plasma confinement inside capillaries has been developed in the past years for plasma-based acceleration to ensure a stable and repeatable plasma density distribution during the interaction with either particles or laser beams. In particular, gas-filled capillaries allow a stable and almost predictable plasma distribution along the interaction with the particles. However, the plasma ejected through the ends of the capillary interacts with the beam before the inner plasma, affecting the quality of the beam. In this article we report the measurements on the evolution of the plasma flow at the two ends of a 1 cm long, 1 mm diameter capillary filled with hydrogen. In particular, we measured the longitudinal density distribution and the expansion velocity of the plasma outside the capillary. This study will allow a better understanding of the beam-plasma interaction for future plasma-based experiments.