title: Search for a specific pattern in a hash map
body: <p>I have the below snippet.I need to find out if there is any key in the map with pattern searching with discount.Help appreciate.</p>
  
  <pre><code>public class MapStringSearch {
  
      public static void main(String[] args) {
  
          Map test = new HashMap();
          test.put("discount.1", 1);
          test.put("discount.2", 2);
          test.put("discount.3", 3);
          test.put("voucher.4", 4);
  
      }
  
  }
  </code></pre>