in reply to Re^2: Simple way to skip spaces and # comments
in thread Simple way to skip spaces and # comments
If certain things are expected to match more than 32766 times, you need to break it down.
So if the following exceeds the limit,
you have to usea+
So,(?:a{1,32766})+
becomes/\G (?: \s++ | \# .*+ )++ /xgc
Or maybe even/\G (?: (?: \s++ | \# .*+ ){1,32766}+ )+ /xgc
/\G (?: (?: (?: \s{1,32766}+ )++ | \# (?: .{1,32766}+ )*+ ){1,32766}+ )+ /xgc
In Section
Seekers of Perl Wisdom