Ask Your Question
1

How to rename all fields using regular expression?

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

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
1

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

jwhalen gravatar image

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

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

Comments

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 -0600 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

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

Seen: 241 times

Last updated: Oct 09 '17