title: How to search JSON data in mysql using Regular expression
body: <p>I am new to regular expression, I have stored JSON data in table. I want to fetch data based on userId, userId is a property of  Users Object.</p>
  
  <p>Example: I want fetch all the records if users contain 513</p>
  
  <p>My table data sample:</p>
  
  <pre><code> Table name:share
  
  Id  name            sharedusers
  1   xxxx            {"accessType":0,"permission":"1","specificUsers":
                      [{"users":"502,512,513","permission":"1"}]}
  
  2   yyy             {"accessType":0,"permission":"1","specificUsers":
                      [{"users":"47,52,60","permission":"1"}]} 
  
  3   zzzz            {"accessType":0,"permission":"1","specificUsers":
                      [{"users":"502,512,513","permission":"1"}]}  
  </code></pre>
  
  <blockquote>
    <p>I have tried this code  but I am getting all the records, filter is not applied</p>
  </blockquote>
  
  <pre><code>SELECT * FROM share where sharedusers  REGEXP '"users":"[[:&lt;:]]513[[:&gt;:]]"';
  </code></pre>
  
  <p>Please give any sample.</p>