I have written a function in XQuery where you can pass a key as an argument and retrieve that key's value, this function can be applied on unformatted text.
I have defined separators (of pairs) as a regular expression pattern that would match all whitespace in addition to commas:
And then I applied another regular expression to extract the key and value parts out of each pair:
This pattern matches any alphanumeric keys (plus dots) and alphanumeric values (plus dots and dashes) that can be optionally quoted.
The full function is as foll...