I am searching the following log file for errors and get a mail if true. 

```
(DIAG:GENERAL)(01:02:07 28/12/2016)(FREE MEM.MB:248846)(USER:SYSTEM)(REMOTE:LOCAL)(Logger successfully started...)
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:248878)(USER:SYSTEM)(REMOTE:LOCAL)(======================================)
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:248878)(USER:SYSTEM)(REMOTE:LOCAL)(Starting 
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:249051)(USER:SYSTEM)(REMOTE:LOCAL)(======================================)
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:249057)(USER:SYSTEM)(REMOTE:LOCAL)(Class manager successfully initialized...)
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:249069)(USER:SYSTEM)(REMOTE:LOCAL)(WinSock successfully initialized...)
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:249069)(USER:SYSTEM)(REMOTE:LOCAL)(Thread manager successfully initialized...)
(DIAG:GENERAL)(01:02:08 28/12/2016)(FREE MEM.MB:249067)(USER:SYSTEM)(REMOTE:LOCAL)(Transaction subsystem successfully started...)
(DIAG:GENERAL)(01:04:29 28/12/2016)(FREE MEM.MB:201470)(USER:SYSTEM)(REMOTE:LOCAL)(Start init basis index reader... Name : )
(DIAG:GENERAL)(01:04:32 28/12/2016)(FREE MEM.MB:201470)(USER:SYSTEM)(REMOTE:LOCAL)(Stop  init basis index reader... Name :  Num : 655711255 Set : 655711255 + 
(DIAG:GENERAL)(01:04:46 28/12/2016)(FREE MEM.MB:200341)(USER:SYSTEM)(REMOTE:LOCAL)(...zipped 292527623 / 655711255 % 44.6123)
(DIAG:GENERAL)(01:05:03 28/12/2016)(FREE MEM.MB:200357)(USER:SYSTEM)(REMOTE:LOCAL)(...zipped 288669002 / 655711255 % 44.0238)
(DIAG:GENERAL)(01:14:35 28/12/2016)(FREE MEM.MB:202999)(USER:SYSTEM)(REMOTE:LOCAL)(RealTimeManager successfully launched... WIZZADOAS)
(DIAG:GENERAL)(01:14:35 28/12/2016)(FREE MEM.MB:202999)(USER:SYSTEM)(REMOTE:LOCAL)(PersistObjectCache initialize...COasStudiaFolderObject max = 1)
(DIAG:GENERAL)(01:14:35 28/12/2016)(FREE MEM.MB:202999)(USER:SYSTEM)(REMOTE:LOCAL)(Report Layout Manager init...)
(DIAG:GENERAL)(01:14:35 28/12/2016)(FREE MEM.MB:202999)(USER:SYSTEM)(REMOTE:LOCAL)(Report Packet Manager init...)
(DIAG:GENERAL)(01:14:35 28/12/2016)(FREE MEM.MB:202999)(USER:SYSTEM)(REMOTE:LOCAL)(Report Packet Parameter Manager init...)
(DIAG:GENERAL)(01:14:35 28/12/2016)(FREE MEM.MB:202999)(USER:SYSTEM)(REMOTE:LOCAL)(CommandManager successfully initialized...)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202993)(USER:SYSTEM)(REMOTE:LOCAL)(PersistObjectCache initialize...COasHistoryTransactionObject max = 195069)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202993)(USER:SYSTEM)(REMOTE:LOCAL)(ReferenceManager successfully initialized...)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202993)(USER:SYSTEM)(REMOTE:LOCAL)(===================================)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202993)(USER:SYSTEM)(REMOTE:LOCAL)(Server64 successfully started....)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202993)(USER:SYSTEM)(REMOTE:LOCAL)(for exit please enter "q"...)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202990)(USER:SYSTEM)(REMOTE:LOCAL)(Check the logfile for current state)
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202987)(USER:SYSTEM)(REMOTE:LOCAL)(===================================)
(DIAG:XMLRPC)(01:14:37 28/12/2016)(FREE MEM.MB:203014)(USER:SYSTEM)(REMOTE:10.67.125.250:3000)(XmlRpc: called member-method 'HandleEvent'.0)s ] = 1052239)
```

```
$a = Get-Content 'D:\log\server.log' | Select-String error

if (!($a -eq $null)) {
    $b = $a | Out-String
    Send-MailMessage -To $me -From $me -Subject "LIVE - Server ERRORs" -Body "$b" -Priority High -SmtpServer $smtp
}

```

So far, so good.  

Now I would like to know how long the server took for the start process. 
The information is there in line

```
(DIAG:GENERAL)(01:02:07 28/12/2016)(FREE MEM.MB:248846)(USER:SYSTEM)(REMOTE:LOCAL)(Logger successfully started...)
```

and 

```
(DIAG:GENERAL)(01:14:36 28/12/2016)(FREE MEM.MB:202993)(USER:SYSTEM)(REMOTE:LOCAL)(Server64 successfully started....)
```

but I don't know how to parse/compare it with RegEx.

Would appreciate help on this as RegEx is not so easy to understand, to be honest.