I have a string pattern of the following form:-
k <- "KK <yvsrss k p p > kfsqs > jijiji >> <yvsrss hjh hjhjh>"
Now, from this I want everything between the <yvsrss and > removed, including the yvsrss. So when I use the following code:-
gsub("<yvsrss.*>", "", k)
it gives the following output
[1] "KK "
I.E. it deletes everything between the first <yvsrss and last >. Whereas I want the following output:-
[1] "KK kfsqs > jijiji >>"
So, everything between the <yvsrss and the first > should be deleted. How can I do this??
Thanks in advance.