The invention provides compounds of formula (I): wherein R1, R2, A, A1 and B are as defined in the specification; processes for their preparation; pharmaceutical compositions containing them; a process for preparing the pharmaceutical compositions; and their use in therapy. The compounds are useful as MMP inhibitors.