Skip to content
Snippets Groups Projects
Commit 950a73a9 authored by jurgenhaas's avatar jurgenhaas
Browse files

Fix regex bug

parent ed2e2c90
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ final class Dotenv {
* @param string $key
*/
private function findEnvironmentVariables(string &$item, string &$key): void {
$pattern = '@\{\$env:(.*)\}@i';
$pattern = '@\{\$env:([\w_]*)\}@i';
preg_match_all($pattern, $item, $item_matches);
preg_match_all($pattern, $key, $key_matches);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment