title: How to create regular expression for java like sql
body: <p>I want to search using pattern.</p>
  <pre><code>String s =&quot;abstract-package-value&quot;;
  </code></pre>
  <p>Suppose I want to search for word which has 'value' in 3rd position.</p>
  <p>I want a pattern like <code>*-*-value</code></p>
  <pre><code>various-paint-kindness
  </code></pre>
  <p>Here, suppose <code>*-paint-*</code>.</p>
  <p>In sql, I can make like <code>%-paint-%</code></p>