title: how can i tell if a string contains ONLY digits and spaces in python using regex
body: <p>I'm trying to write some script in python (using regex) and I have the following problem:</p>
  
  <p>I need to make sure that a string contains ONLY digits and spaces but it could contain any number of numbers.</p>
  
  <p>Meaning it should match to the strings:
  "213" (one number), "123 432" (two numbers), and even "123 432 543 3 235 34 56 456 456 234 324 24" (twelve numbers).</p>
  
  <p>I tried searching here but all I found is how to extract digits from strings (and the opposite) - and that's not helping me to make sure weather ALL OF THE STRING contains ONLY numbers (seperated by any amount of spaces).</p>
  
  <p>Does anyone have a solution?</p>
  
  <p>If someone knows of a class that contains all the special characters (such as ! $ # _ -) it would be excellent (because then I could just do [^A-Z][^a-z][^<em>special-class</em>] and therefore get something that don't match any characters and special symbols - leaving me only with digits and spaces (if I'm correct).</p>