First off, I have to do this in bash. I realize there are other langs better suited but doing it in shell is a hard requirement.
I have a section of this script where I get a blob of data and start working with it as an array. There's this one section that is problematic, I want to get rid of the entire key/value "comments." I can get rid of the key, "comments=" (see below) but I need something that keeps going until it gets to "enabled." Any ideas as to how I might do this? I found a few things that come close but not quite here: http://tldp.org/LDP/abs/html/arrays.html
BLOB="name=foo1 subnets=18.104.22.168/25 site=XYZ comments=this is a comment enabled=true specialCase=false"
stuff=( $BLOB )