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>