Eliminate characters before a pattern in R [duplicate]
问题 This question already has answers here : Remove everything before period [duplicate] (2 answers) Closed 6 years ago . If I have the following dataframe: Fruits ONE_APPLE TWO_BANANAS THREE_ORANGES FOUR_PINAPPLES Is it possible to delete everything before the underscore, getting as a result: Fruits APPLE BANANAS ORANGES PINAPPLES There may be a pattern matching function but I haven't find the right one. Thanks for your support. 回答1: You could try the below gsub command to remove all the