title: Combine matching product fields and separate each with | for product variation images
body: <p>I have a long list of filenames of images which will need to be used to loop through to import a large number of products into a website.</p>
  
  <p>Each product has several colour variations and different angles of the product for example front, back and side view.</p>
  
  <p>Currently there is 1 filename per row in an excel spreadsheet.</p>
  
  <p>The typical filename is something like as follows: 018M-BLK-FRONT.jpg</p>
  
  <p>The filename consists of SKU-COLOUR-VIEW.jpg.</p>
  
  <p>This particular product has 3 images, 1 for the front, 1 for the back and another for the left side as follows:</p>
  
  <pre><code>018M-BLK-BACK.jpg
  018M-BLK-FRONT.jpg
  018M-BLK-LEFT.jpg
  </code></pre>
  
  <p>I want to have all the images for each SKU and colour variation on the same row separated by a | to look like this:</p>
  
  <pre><code>018M-BLK-BACK.jpg|018M-BLK-FRONT.jpg|018M-BLK-LEFT.jpg
  </code></pre>
  
  <p>To clarify the sku section of the filenames are of varying lengths ranging from 3-8 characters, however the colour code section is always 3 characters and they are always seperated by a hyphen (-) as sper the example product provided above. There are a large number of views, but most products have 3 views.</p>
  
  <p>I have tried doing it manually but as I have so many products it will probably take me a week to do it this way.</p>