Q:

Regex, find timezone Except UTC timezone when both are available

I went through many questions on this website but didn't find the solution yet.
I am working on an automation engine which has to read emails automatically. These emails contain both UTC and local time in the message body and I have to pick only non-UTC time for processing it further.
Below is the sample content of the email body. Regex I have tried, is returning both the timezones:
String (Message body):
Date/ Time 1 (SGT): 05-Jan-2020 01:00 - 05-Jan-2020 05:00

Date/ Time 1 (UTC): 04-Jan-2020 17:00 - 04-Jan-2020 21:00

Regex:
Date\s{0,}\/\s{0,}Time.*\((?<TimeZone>\w{3})\)\s{0,}:\s{0,}(?<StartDate>\d{2}-\w{3}-\d{4}\s{1,}\d{1,2}:\d{2})\s{0,}-\s{0,}(?<EndDate>\d{2}-\w{3}-\d{4}\s{1,}\d{1,2}:\d{2})

How to pick only the times from the line which has non-UTC time.

A:

You may try the following regex pattern:
^Date/ Time \d+ \((?!UTC\b).*?\): .*$

Demo
Not much to explain here, except that term: \((?!UTC\b).*?\):
This will match any timezone in parentheses except for UTC.

