Ask Your Question

How to rename all fields using regular expression?

asked 2017-10-09 12:59:57 -0500

jwhalen gravatar image

Working with XML field names can end up with a prefix of 'attr|'. How to remove 'attr|' from all field names?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-10-09 13:01:14 -0500

jwhalen gravatar image

updated 2017-10-09 14:07:41 -0500

metadaddy gravatar image

Use this expression to remove ‘attr|’ from beginning of each field name:

  • Source Field Expression: /'attr|(.*)'
  • Target Field Expression: /$1
edit flag offensive delete link more


This doesn't apply the change to nested fields. XML is inherently nested, so this doesn't really work for most XML data. Is there an approach that is actually designed to work with nested fields?

dcwatson84 gravatar imagedcwatson84 ( 2018-07-27 08:12:50 -0500 )edit
jeff gravatar imagejeff ( 2020-02-12 12:54:19 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-10-09 12:59:57 -0500

Seen: 796 times

Last updated: Oct 09 '17