Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Massive regexp search and replace

by TedPride (Priest)
on Feb 10, 2005 at 16:26 UTC ( #429801=note: print w/replies, xml ) Need Help??


in reply to Massive regexp search and replace

The massive processing time is caused by having to run each regex on each line. The best way to cut processing time is to run the regexes on the entire file instead, or at least as large chunks of it as you can manage. Read x number of bytes and then everything to the next line break; perform all regex calls; output to a new file.

This is a case where buying a block or two of additional memory may be the simplest - and most cost-effective - solution.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://429801]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-10-22 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (271 votes). Check out past polls.

    Notices?