title: Need help in regular expression in java
body: <p>Can somebody help me how to change the below regular expression in such a way that it doesn't allow hyphen and Apostrophe in the first and/or last position. Any help is appreciated.  </p>
  
  <pre><code>"[a-zA-Z][\\s-'a-zA-Z]{0,14}"
  </code></pre>