in reply to How to remove unwanted text from elements of an array?

You should really make an effort to solve the problem yourself. Take a look at How (Not) To Ask A Question and also How do I post a question effectively? as well.

Although you probably didn't intend it, your final sentence sounds like a demand, and not like a request. "Suggest some suitable code for it". Perhaps asking a question would have worked better: Can anyone suggest some suitable code?