if (stri_install_check(silent=TRUE))
stri_locate_all_regex('XaaaaX',
c('\\p{Ll}', '\\p{Ll}+', '\\p{Ll}{2,3}', '\\p{Ll}{2,3}?'))
if (stri_install_check(silent=TRUE))
stri_locate_first_regex('XaaaaX',
c('\\p{Ll}', '\\p{Ll}+', '\\p{Ll}{2,3}', '\\p{Ll}{2,3}?'))
if (stri_install_check(silent=TRUE))
stri_locate_last_regex('XaaaaX',
c('\\p{Ll}', '\\p{Ll}+', '\\p{Ll}{2,3}', '\\p{Ll}{2,3}?'))
Run the code above in your browser using DataCamp Workspace