title: SQL How to convert roman number to numeral vice versa
body: <p>I would like to convert substring in roman to numeral, vice versa.</p>
  
  <p>The input data would be some kind like this:</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/UEAKC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UEAKC.png" alt="Blockquote"></a></p>
  </blockquote>
  
  <pre><code>Input               Output
  Satu I              Satu 1
  Dua II              Dua 2
  Tiga Iii            Tiga 3
  empat Iv            empat 4
  lima v              lima 5
  enam VI             enam 6
  Tujuh 7             Tujuh VII
  delapan 8           Delapan VIII
  Sembilan belas Ix   Sembilan belas 19
  dua puluh xx        dua puluh 20
  Dua Satu xxi        Dua Satu 21
  No numeral          No numeral
  No roman            No roman
  </code></pre>
  
  <p>Roman substring has inconsistent format (uppercase/lowercase/title case)</p>
  
  <p>Is there a simple way to do it?</p>
  
  <p>Or else (second questions), how to get the last substring from string (I, II, Iii, Iv, v, VI, 7, 8, Ix, xx, xxi) ?</p>
  
  <p>I am using MySQL. </p>
  
  <p>Thanks in advance.</p>