Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re: Searching local files

by NetWallah (Canon)
on Jan 13, 2006 at 16:35 UTC ( #523024=note: print w/replies, xml ) Need Help??

in reply to Searching local files

Agree with Sioln's answer, and would like to make it more "relational":

I would make 3 tables :
FILE (Contains ID and File Name, and possibly # of lines, or some indicator of size);
REGEX (Contains an ID, the Regex)
OCCURRANCE (Contains Regex_ID, FIle_ID, Line number).

You can pick a regex from the REGEX table, and find all occurrances from the OCCURRANCE table.

Obviously, run a batch process to populate the tables.

Consider SQLite, if you want a fast, very lightweight,free database.

     You're just jealous cause the voices are only talking to me.

     No trees were killed in the sending of this message.    However, a large number of electrons were terribly inconvenienced.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2023-09-23 17:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found