separating text by leng
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a field of varying length. Some of the rows are 6 length which is what is needed. however some are multiples of six and i need those split out.
for example,
the column below
008334008847183194188052500306
needs to be split into multiple columns 008334 008847 183194 188052 500306
so this would now be five columns.
how would i do this?
Solved! Go to Solution.
- Labels:
- Parse
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @parria1 ,
You can split on each digit and then count the number of digits to form groups of six. You can split to each digit via a RegEx tool.
Then it's just a matter of identifying the correct groups, before forming the complete 6-digits fields again.
Hope that helps.
Regards,
Angelos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @parria1 ,
Here is an example for you, it is achieavable using a group of tools described in the attached example.
Best,
FErnando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
your workflow works fine on my example but when i insert it into my larger production workflow it just outputs the first digit of the field instead of six. it splits it to rows, but each record as just the first digit of the field shown.
for example
RecordID Digit Group Output
1 0 008334
2 1 008334
2 2 008847
2 3 183194
2 4 188052
2 5 500306
becomes this
RecordID Digit Group Output
1 0 0
2 1 0
2 2 0
2 3 1
2 4 1
2 5 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @parria1 ,
Is your input those digits below?
008334
008334
008847
183194
188052
500306
Can you make sure that you have configured the summarize tool to concatenate the digits (instead of any other selection, such as First?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
actually i do not need anything after the regex tool this is perfect, thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
sorry, i cannot get this to work. the regex tool in the other answer is all that is needed.