title: Mysql replace using regular expression
body: <p>I have a query like the following</p>
  
  <pre><code>SELECT FIELDATA FROM DATASET WHERE CATID = 2;
  </code></pre>
  
  <p>Output is </p>
  
  <pre><code>21@Marketing;76@Sales
  </code></pre>
  
  <p>The output can also be the following in case the database does not have multiple values stored.</p>
  
  <pre><code>21@Marketing
  </code></pre>
  
  <p>I tried the following </p>
  
  <pre><code>SELECT SUBSTRING_INDEX(FIELDATA, '@', -1) AS FIELDATA FROM DATASET WHERE CATID = 2; 
  </code></pre>
  
  <p>but it did not give the desired result.</p>
  
  <p>Is it possible to do string manipulation so that the output becomes 
  <strong>Marketing, Sales</strong> in the former and just <strong>Marketing</strong> in the latter.</p>
  
  <p>To summarise The pattern of input </p>
  
  <pre><code> number1@text1;number2@text2;number3@text; 
  </code></pre>
  
  <p>and the output should be </p>
  
  <pre><code> text1, text2, text3
  </code></pre>