Create a perl script for string matching

Reply

Join Date: Jul 2005
Posts: 1
Reputation: MelaOS is an unknown quantity at this point 
Solved Threads: 0
MelaOS MelaOS is offline Offline
Newbie Poster

Create a perl script for string matching

 
0
  #1
Jul 1st, 2005
Hi All,

I am currently trying to create a perl script that takes sql statement that is stored within text files and add up the frequency for that sql statement in that text file and store the sql statement and the no of frequency in another file.

Below is a sample of the sql statement that i would be capturing.

SELECT F_PRODUCT.BUILDING, F_PRODUCT.TESTER, PEDB.Name, PEDB.Email, T1.Name AS PLMName, T1.Email AS PLMEmail, PEDB_1.Name AS QREName, PEDB_1.Email AS QREEmail,

The thing is, there's too much variety to do a efficient pattern matching on these statements.

So would it be possible to first add a " in front of each statement and a " at the back of each statement, and then by using " " as a delimiter i can take whatever sql statement that is found between two ", and use that to compare to other statements in the line to get the frequency and finally storing that statement along with it's no of frequency on another text file.

If you know of any better way or if there's already actual program/scripts that does that, pls advise.

Thank you for your time and attention.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC