How to pull numbers out of a string
Here’s a little function to pull numbers out of a string.
import re
def calculate(value):
newVal = re.sub("[^0-9]", "", value)
if newVal == "":
return 0
elif newVal is None:
return 0
else:
return newVal
calculate( !Size! )
Happy GISing!
Lindsy Hales Bentley