@@ -343,7 +343,7 @@ def determine_delimiter(first_row) -> str:
343
343
if first_row .count (';' ) < first_row .count (',' ):
344
344
delimeter = ','
345
345
346
- first_row = re .sub (r"\s+" + re .escape (delimeter ) + "|" + re .escape (delimeter ) + "\s+" , delimeter , first_row ) #trim values
346
+ first_row = re .sub (r"\s+" + re .escape (delimeter ) + "|" + re .escape (delimeter ) + r "\s+" , delimeter , first_row ) #trim values
347
347
348
348
csvfile = itertools .chain ([first_row ], csvfile ) #add clean header to begining of iterator
349
349
@@ -379,7 +379,7 @@ def determine_delimiter(first_row) -> str:
379
379
variable_name = row ['variable name' ] if row ['variable name' ] else row ['documented name' ]
380
380
variable_name = variable_name = variable_name .strip ().lower ().replace (' ' , '_' ).replace ('__' , '_' ) #clean name
381
381
382
- if re .search ("[^a-zA-Z0-9\_]" , variable_name ) :
382
+ if re .search (r "[^a-zA-Z0-9\_]" , variable_name ) :
383
383
print ("WARNING Invalid Name : " + str (variable_name ) + " reg: " + str (row ['register' ]) + " doc name: " + str (row ['documented name' ]) + " path: " + str (path ))
384
384
385
385
#convert to float
@@ -913,7 +913,7 @@ def validate_registry_entry(self, entry : registry_map_entry, val) -> int:
913
913
return 0
914
914
915
915
if entry .data_type == Data_Type .ASCII :
916
- if val and not re .match ('[^a-zA-Z0-9\_\-]' , val ): #validate ascii
916
+ if val and not re .match (r '[^a-zA-Z0-9\_\-]' , val ): #validate ascii
917
917
if entry .value_regex : #regex validation
918
918
if re .match (entry .value_regex , val ):
919
919
if entry .concatenate :
0 commit comments