Splunk Search

Regex for pattern match

RashmiGowda
Explorer

Hello

I need a regex expression to match the below patern in my abc.log

Pattern details:

, 2014-03-20 13:43:55.608, 2014-03-20 13:43:55.612,

-- Contains sring values.

Please suggest the regex for this..??

Thanks in advance..!!

Tags (1)
0 Karma
1 Solution

MuS
Legend

Hi RashmiGowda,

based on this one line example try something like this:

... | rex ">,\s(?<stringfield>.+),\s<" | ...

cheers, MuS

View solution in original post

0 Karma

ddrillic
Ultra Champion

You can work on it like this -

your base search 
| eval basavalue="2014-03-20 13:43:55.608"
| rex field=basavalue "(?<a_1>\d\d\d\d)-(?<a_2>\d\d)"
0 Karma

tsmets
Engager

I downvoted this post because question is unclear

0 Karma

MuS
Legend

Hi RashmiGowda,

based on this one line example try something like this:

... | rex ">,\s(?<stringfield>.+),\s<" | ...

cheers, MuS

0 Karma

kristian_kolb
Ultra Champion

RashmiGowda,

You might have to provide a little more information; in which context are you trying to use the regex (search, field extraction, what config files etc), and also; how is it not working.

/k

RashmiGowda
Explorer

Its not working.. 😞

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...