Question: I want to change this:

```
input <- c("Théodore Agrippa d'AUBIGNÉ", "Vital d'AUDIGUIER DE LA MENOR")

```

into this :

```
output <- c("Théodore Agrippa d'Aubigné", "Vital d'Audiguier De La Menor")

```

The only words that should be modified are those that are all upper case.

**Edit:** 

An edge case, where first letter of sequence isn't in `[A-Z]`:

```
input <- "Philippe Fabre d'ÉGLANTINE"

```

Answer: 
Form two groups with boundaries on both sides as in

```
\b([A-Z])(\w+)\b

```

and use `tolower` on the second group (leaving the first untouched).  

See [**a demo on regex101.com**](https://regex101.com/r/gdaEQR/1/) (and mind the modifiers, especially `u`).

---

*As a side note: you still have a couple of questions with (not yet accepted) answers.*
You could also use the [snakecase pkg](https://github.com/Tazinho/snakecase) and specifically set `sep_in = " "` to not delete non-alphanumerics like `'` (default is `sep_in = "[^[:alnum:]]"`):

```r
library(snakecase)

input <- c("Théodore Agrippa d'AUBIGNÉ", "Vital d'AUDIGUIER DE LA MENOR")
output <- c("Théodore Agrippa d'Aubigné", "Vital d'Audiguier De La Menor")

to_title_case(input, sep_in = " ")
#> [1] "Théodore Agrippa d'Aubigné"    "Vital d'Audiguier De La Menor"

identical(to_title_case(input, sep_in = " "), output)
#> [1] TRUE

```

Created on 2019-08-01 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)

This works because

1. **snakecase** treats special characters as words, when they are not specified as input separators via `sep_in`.
2. `snakecase::to_title_case()` first applies `snakecase::to_sentence_case()` which separates words by " " and afterwards wraps the (lower case) result inside `tools::toTitleCase()` which doesn't capitalize lone standing "d"'s, i.e. " d ' aubigné" becomes " d ' Aubigné".
3. **snakecase** always "protects" its output, i.e. it cleanes up the messy and probably not intended output separators (here " ") around non-alphanumeric characters (here `'`). (For numeric characters the behaviour can be adjusted via the `numerals` argument).