Regular expression to pull number out of registry key

(imported topic written by doubleminus91)

For an analysis, I want to pull only a numeric value out of a key.

Example -

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Disk Version

Value: DisplayName

DisplayName value: System Series 2.5 February 06, 2009

Is it possible to use relevance language to display only the “2.5” portion for all machines in the environment?

I’m imagining this is pie in the sky, but thought I would check.

(imported comment written by jessewk)

I think this will work. It looks for the first integer in the string and pulls everything from there until the next white space character:

parenthesized parts 1 of first matches (regex "(\d+

^\s

*)") of (it as string) of values “DisplayName” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Disk Version” of registry

(imported comment written by doubleminus91)

Amazing - works perfectly, thanks