Hi , I want to find words that start with capital letter and end with capital letter, tried this:
\\b([A-Z])+([a-zA-Z]+)?([A-Z])\\b
but it doesn"t work in here:
structure(list(Name_1 = c("Name_2", "Andy", "Angelica P.", "Angelica",
"Andy A.", "Aaron", "Aaron J.", "Betty", "Barack O.", "Ben",
"BettyX", "Barack", "Ben T.", "Chrissy", "Celeste J.", "Celeste",
"Chrissy L.", "Cameron", "Cameron W.", "Candace", "Candace O.",
"Danny", "Danny S.")), spec = structure(list(cols = list(Name_1 = structure(list(), class = c("collector_character",
"collector"))), default = structure(list(), class = c("collector_guess",
"collector")), delim = ","), class = "col_spec"), row.names = c(NA,
-23L), class = c("spec_tbl_df", "tbl_df", "tbl", "data.frame"
))
It should match only BettyX not others.
Any ideas will be greatly appreciated, thank you