Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Simple way to skip spaces and # comments

by ikegami (Pope)
on Jul 31, 2020 at 14:42 UTC ( #11120148=note: print w/replies, xml ) Need Help??


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,

a+
you have to use
(?:a{1,32766})+
So,
/\G (?: \s++ | \# .*+ )++ /xgc
becomes
/\G (?: (?: \s++ | \# .*+ ){1,32766}+ )+ /xgc
Or maybe even
/\G (?: (?: (?: \s{1,32766}+ )++ | \# (?: .{1,32766}+ )*+ ){1,32766}+ )+ /xgc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11120148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2020-10-24 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (248 votes). Check out past polls.

    Notices?