title: MySQL REGEXP + whitespace (\s)
body: <p>The database I work with stores JSON entries in LONGTEXT datatypes. I want to be able to SELECT entries depending on the JSON data. Here's some example data:</p>
  
  <pre><code> {
      "12f9cb0a-2218-4590-a05d-c1ffab00f693":  {
          "0":  {
              "value": "test"
          }
      },
      "4d1dfd2e-7bc1-4303-9c8c-90856e918bb9":  {
          "item":  {
              "0": "11"
          }
      }
   }
  </code></pre>
  
  <p>So I want to select data that contains <strong>"4d1dfd2e-7bc1-4303-9c8c-90856e918bb9":  { "item": { "0":"11" } }</strong> by filtering out the whitespace (tabs, spaces, new lines) using the REGEXP function, I have tried this to no avail:</p>
  
  <pre><code>SELECT * FROM my_table WHERE (elements REGEXP BINARY '"4d1dfd2e-7bc1-4303-9c8c-90856e918bb9":\s*{\s*"item":\s*{\s*"0":\s*"11"\s*}\s*}');
  </code></pre>
  
  <p>The regex test works using Rubular and Regexpal.com but MYSQL doesn't seem to like the <strong>\s*</strong> expression. Does anyone have a better solution for this?</p>