I have an ini like file where we have list of <key> = <value> items. What complicates things is that some values are multiline and can contain = character (tls private key).
Example:
groupid = foo
location = westus
randomkey = fbae3700c34cb06c
resourcename = example4-resourcegroup
tls_private_key = -----BEGIN RSA PRIVATE KEY-----
//stuff
-----END RSA PRIVATE KEY-----
foo = 123
faa = 223
What I have so far for pattern is this /^(.*?)\ \=\ (.*[^=]*)$/m and it works for all keys except the tls_private_key because it contains = so it only fetches partial value.
Any suggestions?