Is it possible to remove more than 1 character from a string in a field using the field calculator?
I know
!file!.replace(" ","")
removes spaces in a string, but is it possible to remove spaces and other characters such as "!", "?", "," all at once?
I have also tried:
Pre Logic Script:
def replChars(Name):
replaceChars = ["!","?",","]
for char in replaceChars:
Name.replace(char,"")
Field =
replChars(!NH_NAME!)
!
may cause problems and may need to be escaped due to arcpy using!
to identify field names