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