Skip to main content
Question

How to insert a character into specific position for many attributes?

  • March 27, 2020
  • 2 replies
  • 369 views

I'm trying to update a large file with many attributes. The original file's attribute names followed a specific nomenclature with 4 alphanumeric chars, then an 'X', then followed by 3 digits. An example:

ZA01X001

The new file now has the 'X' stipped out, so the new example is:

ZA01001

My problem is that my workflow uses an AttributeManager to rename about 80 different attribute names from a separate lookup table that corresponds the attribute coded name to a variable name like so:

ZA01001 = Total Population with Medicaid Coverage

So this new file is throwing off my AttributeManager with the 'X' now gone. My question is, how can I use the BulkAttributeRenamer or other method to easily insert an 'X' into the 4th position of all attribute names?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • March 27, 2020

Try this, regular expression replace - match the first 4 characters then replace with those 4 characters and an X


  • Author
  • 1 reply
  • March 27, 2020

That worked perfectly! Thank you very much @ebygomm