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!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...