in reply to Is there a hard limit on + in a regex?
Iteration of complex patterns is achieved through recursion. The recursion limit is REG_INFTY, typically set to 32K when compiling but sometimes set lower on platforms with small default stack sizes.
The intention is that this restriction will be removed in a future version of perl, by replacing the use of the C stack with an independent resizable stack. Then you'll be able to iterate as far as you have memory available.
(By way of example, the limit is currently too high on linux, as evidenced by core dumps:
.)zen% perl -wle '$_="abc" x 33000; print "ok" if /^(a|bc)+$/' Segmentation fault (core dumped) zen%
Hugo
|
|---|