Match SiteScope Log file path

1.4k Views Asked by At

I'm trying to monitor a log file using sitescope. The file is came from the ReportServer and has format of

ReportServerService__02_18_2015_00_00_01.log

I can get the month, day and year but when I trying to inject a regex to match the succeeding text, It cannot read the file. If I hard coded the succeeding text it works.

Below is the Log file path text I used. but it can't read the file.

 s/\\server\LogFiles\ReportServerService__$0month$_$0day$_$year$_([0-
 9][0-9])_([0-9][0-9])_([0-9][0-9]).log/
1

There are 1 best solutions below

0
On

Try this regex:

s/\\\\server\\LogFiles\\ReportServerService__$0month$_$0day$_$year$_(\d{2})_(\d{2})_(\d{2})\.log/