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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

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, ...