I am trying to remove all characters preceding the first capital letter instance for each line in a line vector:
x <- c(" its client Auto Group", "itself and Phone Company", ", client Large Bank")
I tried:
sub('.*?[A-Z]', '', x)
But this returns:
"uto Group" "hone Company" "arge Bank"
I need to return it:
"Auto Group" "Phone Company" "Large Bank"
Any ideas?
Thank.
source
share