FieldA contains text: both numeric(123) and alpha-numeric(123a, 2-3, 3/2, '). FieldB is longstring. I want to use field calculator and codeblock on FieldB to bring from Field A only the numeric values.
while True:
try:
val = int(x)
print (val)
break
except ValueError:
print ("non-numeric")
break
I tried something similar to the code seen here, but the process fails at some point. I just need something to see if fieldA .isdigit and if true copy to fieldB(if false pass a string "non-numeric"). Or anything similar.
I am using ArcGIS 10.2 for Desktop.