fork download
  1. import re
  2. text = r'Node57Name123.grpObject12.grp23Symbol43.shape52.anotherobject25.shape23'
  3. print( re.sub(r'^([^.]*\.)|\d+(?![^.])', r'\1', text) )
Success #stdin #stdout 0.03s 9660KB
stdin
Standard input is empty
stdout
Node57Name123.grpObject.grp23Symbol.shape.anotherobject.shape