string1 = "A((..A>B)A"gsub(">[[:alpha:]]|[[:punct:]]", "", string1)
Standard input is empty
[1] "AAA"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!