also allow timestamp to be encompassed in []
Browse files- logmetric.py +1 -1
logmetric.py
CHANGED
@@ -68,7 +68,7 @@ class LogMetric(evaluate.Metric):
|
|
68 |
"""TODO: Short description of my evaluation module."""
|
69 |
|
70 |
# Constant regex to get timestrings
|
71 |
-
timestamp_regex = r'^\s*(\d{4}[-/.]\d{2}[-/.]\d{2}(?:[ T]\d{2}[:]\d{2}(?:[:]\d{2}(?:[.,]\d+)?)?(?:Z|[+-]\d{2}[:]\d{2})?)?)\s*'
|
72 |
timestamp_pattern = re.compile(timestamp_regex, re.MULTILINE)
|
73 |
|
74 |
|
|
|
68 |
"""TODO: Short description of my evaluation module."""
|
69 |
|
70 |
# Constant regex to get timestrings
|
71 |
+
timestamp_regex = r'^\s*\[?\s*(\d{4}[-/.]\d{2}[-/.]\d{2}(?:[ T]\d{2}[:]\d{2}(?:[:]\d{2}(?:[.,]\d+)?)?(?:Z|[+-]\d{2}[:]\d{2})?)?)\s*\]?\s*'
|
72 |
timestamp_pattern = re.compile(timestamp_regex, re.MULTILINE)
|
73 |
|
74 |
|