Using a unique dataset with information on the currency composition of firms' assets and liabilities in six Latin-American countries, I investigate how the choice of exchange rate regime affects firms' foreign currency borrowing decisions and the associated currency mismatches in their balance sheets. I find that after countries switch from pegged to floating exchange rate regimes, firms reduce their levels of foreign currency exposures, in two ways. First, they reduce the share of debt contracted in foreign currency. Second, firms match more systematically their foreign currency liabilities with assets denominated in foreign currency and export revenues-effectively reducing their vulnerability to exchange rate shocks. More broadly, the study provides novel evidence on the impact of exchange rate regimes on the level of un-hedged foreign currency debt in the corporate sector and thus on aggregate financial stability.