l-wright

Logmon Regex question

Discussion created by l-wright on Oct 22, 2012
Latest reply on Oct 23, 2012 by jonhcw

/.servername.\S*(\d*?).\s*.(\d+).(\w).\s*.(\d+).\s*(\d+).\s*(\d+).\s*.\S*(\d*?).\s*(\S*).\s*.(\S*)./

 

*servername ipaddress       2 u  824 1024  377    0.613   -5.983   0.118

 

the regex has been created to break the above string up into variables and we need to pass variable 8 (-5.983) as a numerical value.

 

the string is part of the output from ntpq -p on a redhat server.

 

the variable is the offset and can be a positive or negative number.

 

any help with the regex would be appreciated.

Outcomes