Last active
June 20, 2021 16:40
-
-
Save HunterKohler/b19c70371ee7c8d60338a6437fb0800b to your computer and use it in GitHub Desktop.
Environment File Key-Value Pair Regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^([A-Za-z_][A-Za-z0-9_]*)=(?:([^\s'"#]\S*)|(['"])((?:(?!\3)(?:.|\n)|(?<!\\)(?:\\\\)*\\\3)*)\3|())\s*?(?:#.*)?$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The visual is probably wrong. Regexper doesn't support negative look-behinds, so I had to use a different site with a pythonic interpreter.