A field called username has values
INPUT:
kesia@abc.bgf.hf:123
gefuf@ef.eff.gre:872
.I want to take the string before the @ symbol alone like
OUTPUT:
kesis
gefuf
How can this be done in splunk and Which function will be apt to this requirement?
At search time only.i extracted the field username which has sample values i specified.i want to extract a part of that field value
small correction here in rex. Field name extracted with @ is username.
your base search..| rex field=username "(?
i don want to extract it like you said.Using functions i want to take kesia alone from the value kesia@abc.bgf.hf:123 named as a field username
Is the username field a multivalue field or did you just provide two examples for possible values?
And are you referring to an extraction at search time or at indexing time (field extraction)?