title: Alphanumeric string pattern with apostrophe allowed
body: <p>I want to validate name field which excepts only alphanumeric, apostrophe and a dot(.) For example, it should allow the string <code>abc's home99</code>,<code>St. Mary's Hospital</code> but I don't want the string starting with any of the special characters or ending with it for example <code>'abc</code> or <code>abc'</code> or <code>g_abc 56gfhg</code> or <code>abc 56gfhg.</code>.</p>
  
  <p>i have used </p>
  
  <pre><code>stringPattern = /^[a-zA-Z0-9']*$/;
  </code></pre>
  
  <p>pattern but it allows apostrophe anywhere in the string.</p>