Retrieve regular expression named capture groups as a list

re_capture(x, re, ...)

Arguments

x

a character string to capture from

re

the regular expression to use

...

additional arguments passed to regexpr

Value

a named list of matches

Examples

shinyAce:::re_capture("ak09j b", "(?<num>\\d+)(?<alpha>[a-zA-Z]+)", perl = TRUE)
#>   num alpha 
#>  "09"   "j"