# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/((([a-zA-Z]+)(\s)*(:))){1}(\s)*(((?:[\[])?(?:["])?((.)*)(?:["])?(?:[\]]?))?)?([,]?)/"$3": $7$11/g;t' <<< "{
id: \"00000000-0000-0000-0000-000000000000\",
numericId: 0,
accountId: \"00000000-0000-0000-0000-000000000000\",
accountCode: \"\",
groups: [\"group1\"],
isTest: true,
ftpInfo: {
host: \"127.0.0.1\",
port: 21,
homeDirectory: \"/\",
fileMask: \"*.txt\",
username: \"\",
password: \"\",
isPassive: true,
isBinary: true
},
contactName: \"\",
contactEmailAddress: \"\",
createdOn: \"1900-01-01T00:00:00\",
modifiedOn: \"1900-01-01T00:00:00\"
}"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html