title: How to do regex filter in restful service
body: <p>I need to write web-service on spring-boot, just using for example:  </p>
  
  <p><code>/hello/contacts?nameFilter=^.*[abc].*$</code> 
  and return all names from DB w/o symbols a,b,c (just like reverse) and etc.</p>
  
  <p>In controller class I have this:</p>
  
  <pre><code>@RequestMapping(value = "/contacts",
                  method = RequestMethod.GET,
                  produces = {MediaType.APPLICATION_JSON_VALUE}
  )
  List&lt;Contact&gt; getAllContactsByName(@RequestParam(name = "nameFilter") String nameFilter);
  </code></pre>
  
  <p>service class:</p>
  
  <pre><code>@Autowired
  private ContactDao contactDao;
  
  @Override
  public List&lt;Contact&gt; getContactsByNameFilter(String nameFilter) {
      return nameFilter == "" ? findAllContacts() : contactDao.findByRegex(nameFilter);
  }
  
  
  public List&lt;Contact&gt; findAllContacts(){
      return contactDao.findAll();
  }
  </code></pre>
  
  <p>How I should implement method <code>findByRegex(nameFilter)</code> in dao layer class?
  Do I must do reverse filter in service class, not in dao. And how I can do it without using sql.</p>
  
  <p>Sorry for some mistakes and my english, just started to learn spring-boot, after java se courses. </p>