"level" : NumberInt(3), - > "level" : 3
code : o.level = str(s.replace(r\'[^0-9]\', \'\'))
It cannot be replaced by a regular expression.