Reform String Format in New Column (Solved)

I am looking to take a string with a constant length delineation and reform. I am getting stuck on the reforming process. Here is an example that illustrates what I am attempting to do using names. Logically I am extracting the two parts, taking the initial and appending ", " then looking to recombine with a string combination in the new column.

Which function or function set would I use to recombine strings into a new column?


recombine.transform (2.7 KB)

Split the columns on the space using the Split Col Transform. These gives you 2 new columns. Then you can Cat Cols in the order you want with the delimiter of your choice.

Or, you can use regex code. This is out of my league.

1 Like

As @DanFeliciano said, the easy way is to use Split Col and then Concat Cols .

You can also do it with Replace using a regular expression, if you are familiar with regex.

presidents.transform (1.4 KB)

See also:

NB/ Iā€™m not an expert on regular expressions! There are plenty of resources online though.

That is a great set of approaches to solve the issue for my needs, thank you @DanFeliciano and @Admin!