here is something I Conjured up, its not the most elegant code but it does the trick so far:
my_str ="C_OPS_CITY=SFO_C_OPS_SITE_INDICATOR=Office_IDENTITYCATEGORY=Employee_C_OPS_COMPANY=My Company_"
response = my_str.split("=")
for x in range(1,response.__len__()):
split = response[x].split("_", 1)
response[x-1] = [response[x-1], split[0]]
response[x] = split[1]
print(response)
The above code produces the result:
[['C_OPS_CITY', 'SFO'], ['C_OPS_SITE_INDICATOR', 'Office'], ['IDENTITYCATEGORY', 'Employee'], ['C_OPS_COMPANY', 'My Company'], '']
The Idea is that we first split by the equal signs as we know those will always exist to delimit the keys and values and then we simply split the values on the first underscore ('_') that we see, any text after that underscore is a key for the next term and we go through each element doing this.
(EDIT)
Also I noticed that I just used python without knowing which language you were using but this solution should be easily reproducible in other languages albeit with minor adjustments.
_you could extract key & value with(.+?)=([^_]*)_