Hello experts,
I Just want my field `snow_os_version` to be up to 2 decimal points like the first entry should only be `3.10`, How to achieve that.
Hi @microsac,
it depends on the valuer in SNOW, if you're sure that the format is always "nn.nn", you could use a regex like this:
| rex field=snow_os_version "^(?<snow_os_version>\d+\.(\d|(\d\d)))"
Ciao.
Giuseppe
Hi @gcusello ..
I tried something similar rex field=snow_os_version "(?<os_version>\d+\.\d{1})" but it only upto 1 decimal number like `3.1` i need it to take like `3.10`
Try like this
Your current search
| eval snow_os_version=replace(snow_os_version,"^(\d+\.\d+).*","\1")
Hi @microsac,
it depends on the valuer in SNOW, if you're sure that the format is always "nn.nn", you could use a regex like this:
| rex field=snow_os_version "^(?<snow_os_version>\d+\.(\d|(\d\d)))"
Ciao.
Giuseppe