title: How to check if a string contains dot (period)?
body: <p>I'd like to find whether a string contains one or more dots. Here is my code:</p>
  <pre><code>package main 
    
  import ( 
      &quot;fmt&quot;
      &quot;regexp&quot;
  ) 
      
  func main() { 
      s1 := &quot;Welcome to dotless string&quot;
      p1 := &quot;.&quot;
    
      res1, e := regexp.MatchString(p1, s1) 
      fmt.Println(&quot;Result and Error is:&quot;, res1, e) 
    
  } 
  </code></pre>
  <p>But it does not work:</p>
  <pre><code>Result and Error is: true &lt;nil&gt;
  </code></pre>
  <p>While it should return <code>false &lt;nil&gt;</code>.</p>
  <p>How can I fix <a href="https://play.golang.org/p/OzOFqYgYIEp" rel="nofollow noreferrer">this</a>?</p>