Splunk Search

Extracting information via Regex

Michael_Schyma1
Contributor
Subject:

    Security ID:        NULL SID

    Account Name:       -

    Account Domain:     -

    Logon ID:       0x0



Logon Type:         3



Account For Which Logon Failed:

    Security ID:        NULL SID

    Account Name:       MIF3VB0

    Account Domain:     Company

I want to be able to create a regular expression that just grabs the second Account Name In my search under the title account for which logon failed. Does anyone have any suggestions on how i would go about extracting a variable with two values set to it. I am having many problems trying to figure this out. thank you so much

Tags (3)
0 Karma
1 Solution

Ayn
Legend
(?msi)Account For Which Logon Failed:.+?Account Name:\s+(\S+)

View solution in original post

Ayn
Legend
(?msi)Account For Which Logon Failed:.+?Account Name:\s+(\S+)

Michael_Schyma1
Contributor

Thank you so much, that works perfectly. I got this to work but it doesnt look as good as yours:

rex field=_raw "Account For Which Logon Failed:\W\s+\w+\W\S+\W\W+\S+\W\S+\W\s+\w+\W\w+:\W\W(?.+?)\W"

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...