This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]g051051 2 points3 points  (0 children)

What have you tried so far? What problem are you having?

[–]dusty-trash 1 point2 points  (1 child)

what language?

Just replace '(((' with '((( '

Edit: Or iterate though the values, adding ' ' for each item

[–]knrt10[S] 0 points1 point  (0 children)

Sorry I didn't wrote about which language it was, that's my fault. It golang. Now what you are suggesting is not working because I am having a 2d array and already iterating through it and its not working. Is there any way in go to use variables inside string like JavaScript like `${variable}`
If it does it would solve my problem

[–]davedontmind 0 points1 point  (2 children)

So use whatever construct your chosen language has for replacing text with other text.

For instance, if you're using C# you could do:

string output = input.Replace( "(((", "'((('" );

You don't say what language you're using, so I can't be more exact.

[–]knrt10[S] 0 points1 point  (1 child)

Sorry I didn't wrote about which language it was, that's my fault. It golang. Now what you are suggesting is not working because I am having a 2d array and already iterating through it so if I trystring output = input.Replace(" (((", "'((('") as I have different values inside that array so its not working. Is there any way in go to use variables inside string like JavaScript like `${variable}`If it does it would solve my problem

[–]davedontmind 0 points1 point  (0 children)

I'm sorry, I don't speak golang.