title: MYSQL Order By REGEX
body: <p>I need to search and "order by" by a field whose contents look something like this.</p>
  
  <pre><code>32:string1,24:string2,101:string3,1033:string4
  </code></pre>
  
  <p>Pairs are delimited by commas.
  Then,</p>
  
  <pre><code>sortOrder:string
  </code></pre>
  
  <p>When I know the "string" I want to "order by" the number preceding it (just before the colon).
  And, order by that as a number, not a string.*</p>
  
  <p>That is, if I have "string2", I want 24 to be used as the "order by" <em>number</em>.</p>
  
  <p>Is this possible with mysqli? If so, can you give an example?</p>
  
  <p>If mysqli cannot do it, should I get the results first then reorder (php is used).
  If so, can you offer a solution?</p>
  
  <p>*One issue this may have is the field is text. If it order by a text, then I'd get the order 
  1, 100, 111, 2, 200, 5 (not wanted)
  instead of
  1, 2, 5, 100, 111, 200 (preferred).
  Ugh.</p>