title: What does [^.]* mean in regular expression?
body: <p>I'm trying to get 482.75 from the following text: <code>&lt;span id="yfs_l84_aapl"&gt;482.75&lt;/span&gt;</code></p>
  
  <p>The regex I used is: <code>regex = '&lt;span id="yfs_l84_[^.]*"&gt;(.+?)&lt;/span&gt;'</code> and it worked.</p>
  
  <p>But the thing that I do not understand is why [^.]* can match aapl here? My understanding is that . means any character except a newline; and ^ means negator. So [^.] should be newline and [^.]* should be any number of new lines. However this theory is contrary to real world implementation. </p>
  
  <p>Any help is appreciated and thanks in advance.</p>
  
  <hr>
  
  <p>The python code I used: </p>
  
  <pre><code>import urllib
  import re 
  htmlfile = urllib.urlopen("http://finance.yahoo.com/q?s=AAPL&amp;ql=0")
  htmltext = htmlfile.read()
  regex = '&lt;span id="yfs_l84_[^.]*"&gt;(.+?)&lt;/span&gt;'
  pattern = re.compile(regex)
  price = re.findall(pattern, htmltext)
  print "the price of of aapl is", price[0]
  </code></pre>