I have a document file.yaml that have something like placeholders to replace:
class: ##TOPIC##-area
name: myClass
type: Class
secretKey: private-##SECRET_KEY##
so far I've used grep to get the values of placeholders
grep -P '(?<=##).*(?=##)' file.yaml
then, I had those values:
TOPIC
SECRET_KEY
now, we have to introduce new properties that can have more than one placeholder per line
class: ##TOPIC##-area
name: myClass
type: Class
secretKey: private-##SECRET_KEY##-encoded-##SUFFIX_CODE##
hence, grep no longer worked because the output became:
TOPIC
SECRET_KEY##-encoded-##SUFFIX_CODE
but, I want to have
TOPIC
SECRET_KEY
SUFFIX_CODE
I accept all kinds of suggestions and ideas to solve that. thanks
edit: the idea is to just get those placeholders, not replace them. sorry for the misunderstanding.