Splunk Search

field extraction

hylee
Explorer

log are below..

1 request_uri=/bbs/zboard.php?id=qna&page=177&page_num=20&category=&sn=off&ss=on&sc=on&keyword=&prev_no=1133&sn1=&divpage=1&select_arrange=headnum&desc=asc&tag=

2 request_uri=/bbs/view.php?id=reports&no=37

3 request_uri=/search.php

4 request_uri=/bbs/view.php?id=techdocs&no=74

5 request_uri=/

6 request_uri=/search.php?lang=ko&sa=0&ss=1&sc=1&operator=0&keyword=%C0%DA%BF%F8+%C7%D2%B4%E7

7 request_uri=/bbs/view.php?id=freeboard&page=5&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=hit&desc=desc&no=363

.

.

splunk made a field "request_uri" automatically, but that is not what I want.
splunk doesn't show full "request_uri".

the log are not only 1 form..as you can see, the log are various..so it is hard to make "regular expression".
please help me..

Tags (3)
0 Karma

MuS
Legend

Hi hylee

if I get you correct, you want the field request_uri to be everything after the = sign. If so you can use this regex for example:

   (?<=request_uri\=)(?<request_uri>.*)

this matches everything after request_uri=, hope this helps.

Cheers, MuS

btw, http://gskinner.com/RegExr/ is a perfect regex playground to learn

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...