Regex help!

From: Date: Fri, 05 Jan 2001 00:50:13 +0000
Subject: Regex help!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-32780@lists.php.net to get a copy of this message
I need some (hopefully) simple help with regex's. Basically, I have a whopping great log file that I would like to parse. Each line of the log file consists of one of 70 or so sentences. EVERY sentence takes one of the following three forms: [keyword1]phrase1[keyword2]phrase2 [keyword1]phrase1[keyword2] [keyword1]phrase1 Where the phrases are always consistent, but the keywors are different on each line. What I want to know is what regex's do I need to use in order to extract the keywords from each line? At this stage I am planning to store all of the phrases in a database, and then try each one in turn until I find a match. But is there a better way? Thanks. ====================================================================== Murray Shields Email: murray@globalcat.com.au MU Systems Pty Ltd Phone: +61 7 3351 6677 Global Catalogs Pty Ltd Phone: +61 7 3351 4777

« previous php.general (#32780) next »