Add Parenthesis to comma seperate urls

Hi,

I currently have a set of comma separated value (URLs) formatted like this: https://www.test.com, https://www.test.com, https://www.test.com, https://www.test.com

I need to add parenthesis around each URL to reformat like this: “https://www.test.com”, “https://www.test.com”, “https://www.test.com

How do I best do this?

Hi @Connor_Finlayson! Just to clarify, do you want to add parentheses or quotation marks?

Either way the solution should look something like this:

  1. Column Split (using comma as the delimiter). This will split apart the list of URLs into separate columns for each URL.
  2. Text Merge (where the value is "{URL}"). This will add quotation marks around the value of the URL column. You’ll need to do this for each of the columns that come from the column split.
  3. Column Merge (where you can merge all of the different URLs back together along with their quotations and a comma delimiter).

Does that make sense?

Hey @Connor_Finlayson! You might also have to remove extra whitespace after the comma. You can do that using the Magic Clean step after Step 1 from @andrew’s comment above.

1 Like

Oh, good call @jp! @Connor_Finlayson, let us know if that works :slight_smile:

Another option would be to run a Find and Replace step for the “comma+space” in the columns containing the URLs.

Find: ,[space]
Replace: ",[space]"

Then Text Merge a quotation mark to the beginning of the URL list and to the end.

Either way should get you the same result!

2 Likes

This is a brilliant solution. @Connor_Finlayson – listen to @jp, not me :see_no_evil:

I don’t even know what to say you two. That worked a charm and I am so grateful for you helping me out like this.

Much appreciated!!!

3 Likes

Woo!! Glad to hear it @Connor_Finlayson. We’re here if you have any more questions.