Repository: omry/omegaconf

Issue:
[bug] Env Interpolation doesn't respect paths
```py
from omegaconf import OmegaConf
a = OmegaConf.create({"a": {"b": "${env:DATASET_CONFIG,configs/datasets}"}})
print(a.a.b) # prints '${env:DATASET_CONFIG,configs/datasets}'
```

Should print configs/datasets

Version: 2.0.0.rc24

Discussion:

Patch:
diff --git a/omegaconf/_utils.py b/omegaconf/_utils.py
index 8c7a6e4..126fca1 100644
--- a/omegaconf/_utils.py
+++ b/omegaconf/_utils.py
@@ -258,7 +258,7 @@ def get_value_kind(value: Any, return_match_list: bool = False) -> Any:
     """
 
     key_prefix = r"\${(\w+:)?"
-    legal_characters = r"([\w\.%_ \\,-]*?)}"
+    legal_characters = r"([\w\.%_ \\/:,-]*?)}"
     match_list: Optional[List[Match[str]]] = None
 
     def ret(


Test patch:
diff --git a/tests/test_interpolation.py b/tests/test_interpolation.py
index eb57d8d..6be772d 100644
--- a/tests/test_interpolation.py
+++ b/tests/test_interpolation.py
@@ -147,13 +147,20 @@ def test_env_interpolation_not_found() -> None:
         c.path
 
 
-def test_env_default_interpolation_missing_env() -> None:
+def test_env_default_str_interpolation_missing_env() -> None:
     if os.getenv("foobar") is not None:
         del os.environ["foobar"]
     c = OmegaConf.create({"path": "/test/${env:foobar,abc}"})
     assert c.path == "/test/abc"
 
 
+def test_env_default_interpolation_missing_env_default_with_slash() -> None:
+    if os.getenv("foobar") is not None:
+        del os.environ["foobar"]
+    c = OmegaConf.create({"path": "${env:DATA_PATH,a/b}"})
+    assert c.path == "a/b"
+
+
 def test_env_default_interpolation_env_exist() -> None:
     os.environ["foobar"] = "1234"
     c = OmegaConf.create({"path": "/test/${env:foobar,abc}"})
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 74cb297..06ede88 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -202,6 +202,10 @@ class Dataclass:
         ("???", _utils.ValueKind.MANDATORY_MISSING),
         ("${foo.bar}", _utils.ValueKind.INTERPOLATION),
         ("ftp://${host}/path", _utils.ValueKind.STR_INTERPOLATION),
+        ("${func:foo}", _utils.ValueKind.INTERPOLATION),
+        ("${func:a/b}", _utils.ValueKind.INTERPOLATION),
+        ("${func:c:\\a\\b}", _utils.ValueKind.INTERPOLATION),
+        ("${func:c:\\a\\b}", _utils.ValueKind.INTERPOLATION),
     ],
 )
 def test_value_kind(value: Any, kind: _utils.ValueKind) -> None: