fork download
  1. x <- c("Proper Nouns are usually Capitalized.",
  2. "proper nouns are usually Capitalized. This is, Proper for proper nouns.",
  3. "The IBM5100 Portable Computer was one of the first portable computers.",
  4. "IBM5100 is the name of one of the first portable computers.",
  5. "The IBM5100 Portable Computer was one of the first portable computers.")
  6.  
  7. regmatches(x, gregexpr("[?!.]\\s*\\w+(*SKIP)(*F)|\\b(?!^)\\p{Lu}\\w*\\b", x, perl=TRUE))
Success #stdin #stdout 0.31s 41384KB
stdin
Standard input is empty
stdout
[[1]]
[1] "Nouns"       "Capitalized"

[[2]]
[1] "Capitalized" "Proper"     

[[3]]
[1] "IBM5100"  "Portable" "Computer"

[[4]]
character(0)

[[5]]
[1] "IBM5100"  "Portable" "Computer"