I have a serialized object that looks like this (not including inverted commas):
'key1:value1,key2:value2,key3:value3'
It could also look like this:
'key1:value1,key3:value3'
OR
'key1:value1'
OR
'' (it could be empty)
At this point i have this token-izing logic break up this string (which is a tad bit verbose). Is there a single regular expression that can help me extract values for a given key (or return null) given any of the above strings?
value
? If text strings, for example, any straightforward solution depending on:
and,
need to be not-so-straightforward after all. – Jongware