<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Jeremy. Thanks very much! That worked.  I was googling and trying to read all the regex tutorials I could find. I tried pcre on the server, but wasn't able to get the combinations right.</div>
<div><br>
</div>
<div>I really appreciate the help!</div>
<div><br>
</div>
<div>Don K</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Jeremy Laidman <<a href="mailto:jlaidman@rebel-it.com.au">jlaidman@rebel-it.com.au</a>><br>
<span style="font-weight:bold">Date: </span>Mon, 8 Oct 2012 09:56:26 +1100<br>
<span style="font-weight:bold">To: </span>Don Kuhlman <<a href="mailto:don.kuhlman@schawk.com">don.kuhlman@schawk.com</a>><br>
<span style="font-weight:bold">Cc: </span>Xymon Email List <<a href="mailto:xymon@xymon.com">xymon@xymon.com</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Xymon] File monitor not working in Xymon - using file list generated by wildcard<br>
</div>
<div><br>
</div>
On 6 October 2012 05:49, Don Kuhlman <span dir="ltr"><<a href="mailto:Don.Kuhlman@schawk.com" target="_blank">Don.Kuhlman@schawk.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>Hi folks. I believe the issue is my regex on the file name in the analysis.cfg.</div>
<div>I've used about 15 different values and the only thing I seem to get working is using the direct full filename vs, a regex to match any files.</div>
</div>
</blockquote>
<div> </div>
<div>In regular expressions the asterisk is not a wildcard in the same way as in DOS/Windows.  Instead, it is read as "zero or more of the previous character or symbol."  So what you probably want is ".*".  The dot "." is a one-character-width wildcard, which
 is why it needs to be escaped if you want to match a literal dot.  So ".*" means zero or more of any character.</div>
<div><br>
</div>
<div>Also, a regular expression match is applied only when the match string STARTS with a percent.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>However, using any combos that I can think of as a regex do not:</div>
<div>
<div># FILE %/Volumes/MySQL_Backups/*\.sql red mtime<86400</div>
<div></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Here, you are asking to match zero or more slash characters before a ".sql".</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>
<div># FILE /Volumes/MySQL_Backups/%*\.sql red mtime<600</div>
<div></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Doesn't start with percent.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>#FILE %^*.sql red mtime>86400</div>
</div>
</blockquote>
<div><br>
</div>
<div>Again, ".*" rather than "*".</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>
<div>Can anyone suggest a way to format the analysis.cfg statement to match anything that ends in .sql ?</div>
</div>
</div>
</blockquote>
<div> </div>
<div>Try this:</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div class="im">
<div style="font-family:Calibri,sans-serif;font-size:14px">FILE %/Volumes/MySQL_Backups/mysql_backup_.*\.sql red mtime<86400</div>
<div><br>
</div>
<div>This should go red if the matching file is older than 1 day.</div>
<div><br>
</div>
<div>J</div>
<div><br>
</div>
</div>
</div>
</div>
</span>
</body>
</html>