Hello everyone,
if someone can help figure this problem i'd be greatful
my data looks like this
field | starting after | nbcar |
,A,BC,AZRG | 1 | 1 |
,DB,CQ,AEYG | 2 | 1 |
,ETR,AC,A3,4AQW | 2 | 2 |
and what i want to do is remove from "Field" the specified number of commas in "nbcar" after the comma specifed in the "starting after"
so it would look like this
field | starting after | nbcar | new_Field |
,A,BC,AZRG | 1 | 1 | ,ABC,AZRG |
,DB,CQ,AEYG | 2 | 1 | ,DB,CQAEYG |
,ETR,AC,A3,4A,QW,TRZ | 2 | 2 | ,ETR,ACA34A,QW,TRZ |
I thought maybe it can be done with Regex_replace but i can't seem to make it work
Thank you all,
Nouha
Solved! Go to Solution.
There's probably a more succinct way to do this with RegEx, but here's a solution without RegEx. I split each field into rows and used the [starting after] and [nbcar] fields to determine how to concatenate the rows back together (with or without commas). A Tile tool provided a grouped record ID field.