Displaying 1 result from an estimated 1 matches for "longest_str".
2015 Nov 28
0
[patch] Use JIT for PCRE pattern matching
...er issue: deep recursion and possible segmentation
faults from PCRE (pcre_exec).
# Initialization code
pattern <- "([^[:alpha:]]|a|b)+"
long_string <- paste0(rep("a", 1023), collapse="")
longer_string <- paste0(rep("a", 1024), collapse="")
longest_string <- paste0(rep("a", 1e7), collapse="")
strings <- c(longest_string, longer_string, long_string, rep("a", 8))
# Calls to functions using PCRE
grepl(pattern, strings, perl = TRUE)
# [1] FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
# (output w...