Skip to content
Prev 276902 / 398506 Next

match first consecutive list of capitalized words in string

On Tue, Nov 8, 2011 at 7:48 AM, Richter-Dumke, Jonas
<Richter at demogr.mpg.de> wrote:
Try this. It matches a word boundary followed by zero or more of the
parenthesized expression.  That expression is an upper case letter
followed by zero or more lower case letters followed by one or more
spaces.  Finally we match the last word which consists of an upper
case letter followed by zero or more lower case letters and a word
boundary.  Note that it assumes R 2.14.0 or later:
[1] "Maria"                             "Joh Dirck Kleve"
[3] "Bernardus Engelb Franciscus Linde"