bash: look behind regex

API_DOMAIN=test.api.test.selectiont.com
#API_DOMAIN={{HOST_PREFIX}}{{?API_ID}}.{{sm_domain}}

If its a comment dont change it

perl -pe 's/(?<=#)$key=.*/$key=$value//g' $file;

Leave a Reply

Your email address will not be published.