Ok, so I know there is a similar post that I referred to already but does not fit the exact issue I am having.
For reference: replace a unknown string between two known strings with sed
I have a file with software=setting:value,setting2:value,setting3:value, etc...
My first attempt was to use the reference above with sed -i "/software/ s/setting:.*,/setting:,/" $fileName
However the wildcard references the last comma for that line, not the comma immediately following the match.
My current work around is: sed -i "/software/ s/setting:[^,]*,/setting:,/" $fileName but this limits the ability to have a potential value that contains a comma wrapped inside quotations, etc... I know this is an unlikely scenario but I would like to have an ideal solution where the value can contain any character it would like and just to do a string replacement between the "setting:" and the comma immediately following the value of that particular setting.
Any help is appreciated. Thanks in advance!