This is my input String:
String content = "Hello [To:admin1] Admin 1 , Good Morning [To:user2]
Admin 1, GoodNight [To:user1] Admin 1";
I want to convert this to:
"Hello [To] Admin 1 , Good Morning [To] Admin 1, GoodNight [To] Admin 1"
I am trying to use Regular Expressions but I not able to.
I want replace the text [To:xxxx]
with [To]
Please suggest what can be done.