replace numbers with token if numbers have whitespace on both side
I also tried ' \d+ ' and that works! probably not "pythonic" though...
the code below replaces numbers with the token NUMB:
raw_corpus.loc[:,'constructed_recipe']=raw_corpus['constructed_recipe'].str.replace('\d+','NUMB')
It works fine if the numbers have a space before and a space after, but creates a problem if the numbers are included in another string. 
How do I modify the code so that it only replaces numbers with NUMB if the numbers are surrounded by a space on both sides? e.g. do not modify this string: "from url 500px", but do modify this string: "dishwasher 10 pods" to "dishwasher NUMB pods".
I'm not sure how to modify '\d+' to make this happen. Any ideas?