title: Filter values by regex in JsonPath
body: <p>I was trying to find a way to filter values by regex using JsonPath from Jayway and so far I could more or less do what I want to do.</p>
  
  <p>I'm trying to filter results by values which does not start with 'foo'. To my regex knowledge it should be done by <code>'$..book[?(@.author =~ /^[^foo]/)].author'</code> with the given JSON of </p>
  
  <pre><code>{
      "store": {
          "book": [
              {
                  "category": "reference",
                  "author": "Nigel Rees",
                  "title": "Sayings of the Century",
                  "price": 8.95
              },
              {
                  "category": "fiction",
                  "author": "Evelyn Waugh",
                  "title": "Sword of Honour",
                  "price": 12.99
              },
              {
                  "category": "fiction",
                  "author": "Herman Melville",
                  "title": "Moby Dick",
                  "isbn": "0-553-21311-3",
                  "price": 8.99
              },
              {
                  "category": "fiction",
                  "author": "J. R. R. Tolkien",
                  "title": "The Lord of the Rings",
                  "isbn": "0-395-19395-8",
                  "price": 22.99
              }
          ],
          "bicycle": {
              "color": "red",
              "price": 19.95
          }
      },
      "expensive": 10
  }
  </code></pre>
  
  <p>but it doesn't return any values although none of the values are <strong>not</strong> starting with 'foo'. I've tried it via using the online tool: <a href="https://jsonpath.herokuapp.com/" rel="nofollow noreferrer">https://jsonpath.herokuapp.com/</a></p>
  
  <p>In addition, I can't solve this problem with any Java code or Filters that would be written in Java or similar. Regex would be my more or less only choice here.</p>
  
  <p>Anybody knows how to solve this problem?</p>
  
  <p>Cheers,</p>