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

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

by ikegami (Patriarch)
on Jul 31, 2020 at 14:42 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found