Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Possible to have regexes act on file directly (not in memory)

by hippo (Curate)
on May 02, 2014 at 17:06 UTC ( #1084818=note: print w/ replies, xml ) Need Help??


in reply to Possible to have regexes act on file directly (not in memory)

You already have one answer: split the file into chunks and test each chunk. Can you tell us why you have discarded that approach?


Comment on Re: Possible to have regexes act on file directly (not in memory)
Re^2: Possible to have regexes act on file directly (not in memory)
by brianski (Novice) on May 04, 2014 at 01:27 UTC
    How would you deal with regular expressions of variable length that cross 2 chunks? What about 3 chunks?
      Did anyone read this thread before posting?

      Or even tried following the links provided, leading to answers already given 13 years ago?

      To say it plain, this theoretical idea of regexes creating unlimited matches is bullshit academic masturbation.

      If the match is indeed too large to hold two chunks in memory (which have to be individually bigger than the maximal match), in what way do you expect to be able to process this match???

      Truth is it's far harder to construct problems which can't be solved with sliding windows, then just to solve the real world tasks.

      Cheers Rolf

      ( addicted to the Perl Programming Language)

      update

      PS: If a little boy asks for a birthday cake bigger than any building on earth, do you really honestly start discussing where to find suitable candles?

    • expanded title

        No, it's not academic masturbation.

        This is not the first time I would need such thing due to a concrete real-world-problem.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-08-23 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls