title: Extract characters between specified characters in R
body: <p>I have this variable
  x= "379_exp_mirror1.csv"
  I need to extract the number ("379") at the beggining (which doesn't always have 3 characters), i.e. everything before the first "<em>". And then I need to extract everything between the second "</em>" and the ".", in this case "mirror1".</p>
  
  <p>I have tried several combinations with sub and gsub with no success, can anyone give me some indications please?</p>
  
  <p>Thank you</p>