This is the string :
VERTICA-MIB::vertHostName = STRING: "vertica-1"
i'm trying to extract the hostname so added the following at props.conf:
EXTRACT-vertHostName = ((?(<name>)yes|VERTICA-MIB::vertHostName\s=\sSTRING:\s\")(?<vertHostName>[^"]+))
which returns:
STRING: "vertica-1"
need to return:
vertica-1
OK this works fine on splunk:
EXTRACT-vertHostName = .+VERTICA-MIB::vertHostName\s=\sSTRING:\s\"(?
Your regex is pulling all of the string initially. You have 5 capture groups, only 2 of which are named. Try this.
EXTRACT-vertHostName = VERTICA-MIB::vertHostName\s*=\s*STRING:\s*"(?<vertHostName)[^"]*)"
there is a ( missing here...
and > missing i think...
i also checked this
((?(
with a regexp tool "Regulator" and it seems to work fine there.
at splunk i just add the ?
STRING: "vertica-1"