diff --git a/srunner/tools/openscenario_parser.py b/srunner/tools/openscenario_parser.py index a7c8e05ea..a32b5d6ea 100644 --- a/srunner/tools/openscenario_parser.py +++ b/srunner/tools/openscenario_parser.py @@ -105,7 +105,7 @@ def is_literal(self) -> bool: """ Returns: True when text is a literal/number """ - return self._is_matching(pattern=r"(-)?\d+(\.\d*)?(e[+-]\d*)?") + return self._is_matching(pattern=r"(-)?\d+(\.\d*)?") or self._is_matching(pattern=r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?") def is_parameter(self) -> bool: """