David Sawyer wrote: > But when I execute the script I get the following error... > > C:\mrtg-2.9.4\contrib\14all>perl 14all2.cgi > Content-type: text/html > > <H1>Software error:</H1> > <PRE>/\([^\]*)\.(cgi|pl)$/: unmatched [] in regexp at 14all2.cgi line 104. > </PRE> > <P>
Escape characters can be a bitch. I assume you want to match strings like '\something.pl' but not '\\server\host\whatever.pl' The backslash has a special meaning. It tells the software to use the next character without a special meaning (if any). So, to scan for a backslash, you have to type two of them. You are now starting a range (with '[') containing, amongst other characters, the ']' char. It should probably be something like /\\[^\\]*\.(cgi|pl)$/ although I'm not sure that this is safe! cheers, -- __________________________________________________________________ / [EMAIL PROTECTED] [EMAIL PROTECTED] \ | work private | | My employer is capable of speaking therefore I speak only for myself | +----------------------------------------------------------------------+ | Technical questions sent directly to me will be nuked. Use the list. | +----------------------------------------------------------------------+ | http://faq.mrtg.org/ | | http://rrdtool.eu.org --> tutorial | +----------------------------------------------------------------------+ -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
