Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
(^[A-Z0-9_]+)(\=)(.*\n(?=[A-Z])|.*$)
"
gm

Description

Hunts for the key and value in environment variables separated by newlines. All keys must be uppercase

Submitted by anonymous - 4 years ago