There are some things that I wish were easier with the 'stringr' or 'stringi' packages. The foremost of these is the extraction of numbers from strings. 'stringr' and 'stringi' make you figure out the regular expression for yourself; 'strex' takes care of this for you. There are many other handy functionalities in 'strex'. Contributions to this package are encouraged: it is intended as a miscellany of string manipulation functions that cannot be found in 'stringi' or 'stringr'.
There are some things that I wish were easier with the
stringi packages. The foremost of these is the extraction of numbers
stringr lets you figure this out the regex for yourself;
strex takes care of this for you. There are many more useful
strex. In particular, there’s a
function which is more flexible than the base
Contributions to this package are encouraged: it is intended as a
miscellany of string manipulation functions which cannot be found in
You can install the release version of
You can install the development version of
See the package website at https://rorynolan.github.io/strex.
str_split_by_nums()has been renamed to
str_split_by_numbers()for consistency with
str_get_currencies()has been renamed to
str_extract_currencies()and been greatly improved.
str_get_currency()has been replaced by
str_match_arg()has been updated to behave more like
str_elems()has been added. It is a vectorized version of
str_first_number()more versatile than
str_first_number("1,000")returns the number 1000.