
jknash
stranger
Jul 6, 2001, 12:15 PM
Post #3 of 4
(15676 views)
|
Re: variables in regular expressions
[In reply to]
|
Can't Post
|
|
I tried that and now I get a match every time,,,whethere the hash is included in my script or not. I am running a program called mrtg to monitor our routers which outputs some html files for each router into a predefined directory. I want to do a couple of things with the html files. The html files are named the same - 172.30.12.1.se0.1.html is a good example. I want to parse the ip address out of the filename and compare it to a record in a table in the mysql database. If it's found in the database, I want to query and see if the ip(172.30.12.1) and interface(se0.1) exist in the interfaces table. So basically I need to setup the query, execute it, read the path where the file should be, if it's there parse the filename and put the ip/interface into the interfaces table. That shouldn't be too hard with perl, right? :-) thanks for all of your help
|