Import example ^\d{3}-\d{4}$""
<p>I`ve found an example which seemed to be very strange for me:</p>

<pre><code>import re
for test_string in ['955-1212', 'ILL-EGAL']:
if re.match(r'^\d{3}-\d{4}$', test_string):
    print test_string, 'is a valid US local phone number'
else:
    print test_string, 'rejected'
</code></pre>

<p>The output is: 955-1212 is a valid US local phone number
               ILL-EGAL rejected</p>

<p>What exactly is "^\d{3}-\d{4}$" because when I change some digit, it changes the output to: 
955-1212 rejected
ILL-EGAL rejected</p>
