title: elasticsearch kibana regex to find phone number within string field
body: <p>I tried using the follow query to search for all those which are like phone number within elastic search. </p>
  
  <p>This was the query I tried. However, it does not give me the right answer.</p>
  
  <pre><code>{
    "query": {
      "bool": {
        "must": [
          {
            "query": {
              "regexp": {
                "content": "((\\([0-9]{3}\\) ?)|([0-9]-))?[0-9]-[0-9]{4}"
              }
            }
          },
          {
            "query": {
              "match": {
                "_id": {
                  "query": "1042d6b497124c65b44fdcf86e6986d3.185159"
                }
              }
            }
          }
        ]
      }
    }
  }
  </code></pre>
  
  <p>This is to capture numbers in this format within the text (123) 456-7890</p>
  
  <p>I tried this query as well</p>
  
  <pre><code>{
   "query": {
     "bool": {
       "must": [
         {
           "query": {
             "regexp": {
               "_all":
               {
                 "value" : "content: ((\\([0-9]{3}\\) ?)|([0-9]-))?[0-9]-[0-9]{4}"
               }
             }
           }
         },
         {
           "query": {
             "match": {
               "_id": {
                 "query": "1042d6b497124c65b44fdcf86e6986d3.185159"
               }
             }
           }
         }
       ]
     }
   }
  }
  </code></pre>
  
  <p>The _id does exist and that is being captured when I write that part of the query separately</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks,
  Sharath</p>