How to create a regular expression for Sitescope Log monitor logfile path?

317 Views Asked by At

we have a logfile with a path of

\servername\logs\e2serverd.20210107.000000.691088.log

What is the correct regex to match this logfile if the 12 numbers at the end are random? I have tried

s/\servername\logs\e2serverd.$year$$0month$$0day$.000000.691088.log/ and it works but how do I express the full path so that it would match whatever the numbers at the end?

1

There are 1 best solutions below

1
On

checkout this link: https://regex101.com/r/bDfgU9/1

Whatever may be the 12 digits at the end before the words .log, it should match.(assuming that these 12 digits are seperated in 2 groups of 6 digits each)