I have a key_value result but the fields portion have spaces that I need to convert to underscore to use the set_fields() function. I can use regex_replace -but- the regex I have matches on spaces in the key and value portion. So for instance:
client os version=microsoft windows 10 pro 64-bit
becomes
client_os_version=microsoft_windows_10_pro_64-bit
when what I want is:
client_os_version=microsoft windows 10 pro 64-bit
The usable but not optimal regex with example data (https://regex101.com/r/W3kxCd/1)
(?=\b\s+)\s
{user name=b.oaks, config name=corp-epointsetting, private ip=10.42.7.207, client region=us, client ip=75.75.58.65, client version=5.0.0-87, device name=zz-777, client os version=microsoft windows 10 pro 64-bit, vpn type=device level vpn}
.
I could grok it (as I erroneously suggested on an earlier post by someone else with a similar quest) but then I would have to create one for each possible key_value that comes in… bleh.
What would you do?