How to paste in a terminal using the terminal activities from clipboard

Thank you so much @Anil_G for your response, but we have tried this approach, actually when we are manipulating the string the spaces are correct but when we paste it is not working.