Reputation: 1655
I am looking to replace all *s at the end of a string, in R.
txt <- c("arm","foot-ha-*","lefroo", "bafoobar*")
gsub("/\\*$/","",txt, perl=TRUE);
I would like to convert txt to be "arm" "foo-ha-" "lefroo" "bafoobar"
What am I doing wrong?
Thanks!
Upvotes: 2
Views: 8904