Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Searching local files

by NetWallah (Canon)
on Jan 13, 2006 at 16:35 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-24 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found