Skip to content
Prev 374694 / 398503 Next

removing part of a string

I would use

sub("\\(.*\\)", "()", s)

It is essentially the same as Rui's suggestion, but I find the purpose to
be more clear. It might also be a little more efficient.

HTH
Ulrik
On Mon, 21 May 2018, 15:38 Rui Barradas, <ruipbarradas at sapo.pt> wrote: