Regular Expressions 101

Community Patterns

ESCAPE VALUE FROM KEY WITH SPECIAL CHARACTERS

1

Regular Expression
Python

r'
(.*)([=])(.*)
'
gm

Description

This regex will separate KEY=VALUE when VALUE has special characters that cause bash to misinterpret them

Submitted by anonymous - 4 years ago