Special character classes
Commonly used character classes with their own shortcut:
\.matches any character apart from a newline.\dmatches any digit.\Dmatches anything that isn’t a digit.\smatches any whitespace (e.g., space, tab, newline).\Smatches anything that isn’t whitespace.\wmatches any “word” character, i.e. letters and numbers.\Wmatches any “non-word” character.
## [1] │ abcd ABCD <12345> -!@#%.
## [1] │ <abcd ABCD >12345< -!@#%.>
## [1] │ abcd< >ABCD< >12345< >-!@#%.
## [1] │ <abcd> <ABCD> <12345> <-!@#%.>
## [1] │ <abcd> <ABCD> <12345> -!@#%.
## [1] │ abcd< >ABCD< >12345< -!@#%.>