title: regex invalid expression nothing to repeat
body: <p>I am trying to remove everything except '+' from a string</p>
  
  <p>I am using this:</p>
  
  <pre><code>phone = re.sub(r'[^+]', '', cleaned_data['phone_number'])
  </code></pre>
  
  <p>i tried this too:</p>
  
  <pre><code>phone = re.sub(r'[^\+]', '', cleaned_data['phone_number'])
  </code></pre>
  
  <p>It fails with 'invalid expression'</p>
  
  <p>EDIT: using a debugger if found the error is located in these lines</p>
  
  <pre><code>phone_patterns = [r'^0\d{9}$', r'^\+33\d{9}$']
          for phone_pattern in phone_patterns:
              if re.match(phone, phone_pattern):
                  .....
  </code></pre>
  
  <p>stack_trace:
  Traceback:</p>
  
  <pre><code>File "/path/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    115.                         response = callback(request, *callback_args, **callback_kwargs)
  File "/path/request_quote/views.py" in new
    12.         if formset.is_valid():
  File "/path/local/lib/python2.7/site-packages/django/forms/formsets.py" in is_valid
    277.         err = self.errors
  File "/path/local/lib/python2.7/site-packages/django/forms/formsets.py" in errors
    259.             self.full_clean()
  File "/path/local/lib/python2.7/site-packages/django/forms/formsets.py" in full_clean
    297.             self._errors.append(form.errors)
  File "/path/local/lib/python2.7/site-packages/django/forms/forms.py" in _get_errors
    117.             self.full_clean()
  File "/path/local/lib/python2.7/site-packages/django/forms/forms.py" in full_clean
    273.         self._clean_form()
  File "/path/local/lib/python2.7/site-packages/django/forms/forms.py" in _clean_form
    299.             self.cleaned_data = self.clean()
  File "/path/request_quote/forms.py" in clean
    56.         QuoteForm.COUNTRY_VALIDATORS[country](self, cleaned_data)
  File "/path/request_quote/forms.py" in validate_fr
    102.             if re.match(phone, phone_pattern):
  File "/path/lib/python2.7/re.py" in match
    137.     return _compile(pattern, flags).match(string)
  File "/path/lib/python2.7/re.py" in _compile
    242.         raise error, v # invalid expression
  
  Exception Type: error at /en/request_quote/new/
  Exception Value: nothing to repeat
  </code></pre>
  
  <p>EDIT:
  the error comes from the '+' at the beginning should be escaped but how ?</p>
  
  <p>EDIT2:
  Awfully stupid but i did </p>
  
  <pre><code>re.match(string,pattern)
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>re.match(pattern,string)
  </code></pre>