AnsweredAssumed Answered

Regex assist needed

Question asked by jwhisenant on Jul 28, 2014
Latest reply on Jul 28, 2014 by jwhisenant

I am trying to remove "/1" from the end of every entry in a certain field.  I know I can just strip it off, but I would like to solve it with regex for my own edification.  Here is my code so far.  It runs without error but has no effect on the data.


with arcpy.da.UpdateCursor("Table", "parcel_ID") as rows:

...     for row in rows:

...         badtext=row[0]

...         goodtext=re.sub(r'/1', '', badtext)

...         row[0]=goodtext



Anyone know what I am doing wrong? Thanks.