diff --git a/envyaml/envyaml.py b/envyaml/envyaml.py
index d02118a..e0ba807 100644
--- a/envyaml/envyaml.py
+++ b/envyaml/envyaml.py
@@ -30,15 +30,21 @@ RE_COMMENTS = re.compile(r"(^#.*\n)", re.MULTILINE | re.UNICODE)
 RE_DOT_ENV = re.compile(r"^((?!\d)[\w\- ]+=.*)$", re.MULTILINE | re.UNICODE)
 
 RE_ENV = [
-    (re.compile(r"(?<=\$\{)(.*?)(?=\})", re.MULTILINE | re.UNICODE), ["${{{match}}}"]),
+    (
+        re.compile(r"(?<=\$\{)(.*?)(?=\})", re.MULTILINE | re.UNICODE),
+        ["${{{match}}}"]
+    ),
     (
         re.compile(r"(?<=[\"\']\$)(.*?)(?=[\"\']$)", re.MULTILINE | re.UNICODE),
         ['"${match}"', "'${match}'"],
     ),
-    (re.compile(r"\$(?!\d)(.*)", re.MULTILINE | re.UNICODE), ["{match}"]),
+    (
+        re.compile(r"\$(?!\d)(.*)(?<![\s\]])", re.MULTILINE | re.UNICODE),
+        ["{match}"]
+    ),
 ]
 
-__version__ = "1.1.201202"
+__version__ = "1.2.201222"
 
 
 class EnvYAML:
@@ -138,8 +144,8 @@ class EnvYAML:
                 name, value = line.strip().split("=", 1)  # type: str,str
 
                 # strip names and values
-                name = name.strip().strip("'\"")
-                value = value.strip().strip("'\"")
+                name = name.strip().strip("'\" ")
+                value = value.strip().strip("'\" ")
 
                 # set config
                 config[name] = value

diff --git a/tests/env.test.yaml b/tests/env.test.yaml
index 156ae33..7f97a5c 100644
--- a/tests/env.test.yaml
+++ b/tests/env.test.yaml
@@ -77,6 +77,9 @@ empty:
   novalues:
   noenvvalue: $EMPTY_ENV|""
 
+var_in_array:
+  to: [ $USERNAME ]
+
 #
 # Comments
 #
diff --git a/tests/test_envyaml.py b/tests/test_envyaml.py
index dba827a..b45941f 100644
--- a/tests/test_envyaml.py
+++ b/tests/test_envyaml.py
@@ -284,3 +284,10 @@ def test_it_should_return_proper_formatted_string():
 def test_it_should_raise_exception_in_strict_mode():
     with pytest.raises(ValueError):
         EnvYAML("tests/env.ignored.yaml")
+
+
+def test_it_should_parser_environment_inside_array_and_object():
+    env = EnvYAML("tests/env.test.yaml", env_file="tests/test.env")
+
+    # assert array
+    assert env['var_in_array.to.0'] == 'env-username'

Parsing fails with inline list
I had the below structure in a config file and the parsing 

```
mail:
    to: [ $HANDLERS_SMTP_TO ]
```

I get the following error
`ValueError: Strict mode enabled, variable $SMTP_HANDLER_TO] not defined!`

The below works just fine though

```
mail:
    to:
        - $HANDLERS_SMTP_TO
```
tests/test_envyaml.py::test_it_should_read_env_file tests/test_envyaml.py::test_it_should_read_custom_file tests/test_envyaml.py::test_it_should_get_default_values tests/test_envyaml.py::test_it_should_raise_key_error_when_no_values tests/test_envyaml.py::test_it_should_populate_env_variable tests/test_envyaml.py::test_it_should_return_dict_on_export tests/test_envyaml.py::test_it_should_convert_config_to_dict tests/test_envyaml.py::test_it_should_access_all_keys_in_config tests/test_envyaml.py::test_it_should_access_keys_and_lists tests/test_envyaml.py::test_it_should_read_config_from_env_variable tests/test_envyaml.py::test_it_should_use_default_value tests/test_envyaml.py::test_it_should_get_lists_values_by_number tests/test_envyaml.py::test_it_should_proper_handle_dollar_sign_with_number tests/test_envyaml.py::test_it_should_proper_complex_variable tests/test_envyaml.py::test_it_should_proper_complex_variable_2 tests/test_envyaml.py::test_it_should_return_proper_formatted_string tests/test_envyaml.py::test_it_should_parser_environment_inside_array_and_object
tests/test_envyaml.py::test_it_should_return_default_value tests/test_envyaml.py::test_it_should_access_environment_variables tests/test_envyaml.py::test_it_should_fail_when_access_environment_variables tests/test_envyaml.py::test_it_should_access_environ tests/test_envyaml.py::test_it_should_read_default_file tests/test_envyaml.py::test_it_should_raise_exception_when_file_not_found tests/test_envyaml.py::test_it_should_not_fail_when_try_load_non_exist_default_file tests/test_envyaml.py::test_it_should_not_fail_when_try_load_default_empty_yaml_file tests/test_envyaml.py::test_it_should_not_fail_when_try_load_default_empty_dotenv_file tests/test_envyaml.py::test_it_should_be_valid_in_check tests/test_envyaml.py::test_it_should_be_read_if_strict_disabled tests/test_envyaml.py::test_it_should_raise_exception_in_strict_mode