search for: strcapture2

Displaying 1 result from an estimated 1 matches for "strcapture2".

Did you mean: strcapture
2024 Jan 29
1
strcapture performance when perl = TRUE
...anted to raise the possibility of improving strcapture performance in cases where perl = TRUE. I believe we can do this in a non-breaking way by calling regexpr instead of regexec (conditionally when perl = TRUE). To illustrate this I've put together a 'proof of concept' function called strcapture2 that utilises output from regexpr directly (following a very nice substring approach that I've seen implemented by Toby Hocking in the nc package - nc::capture_first_vec). strcapture2 <- function(pattern, x, proto, perl = FALSE, useBytes = FALSE) { if (isTRUE(perl)) { m <- re...