Splunk Search

Help with regex..?

prakash007
Builder

Need help with regex...should start with " end with space or ?

Need entire string in a field starting with " and end until j.prod or c.cat etc...

 "GET /brit-pocket09fress/cprod121000019___/j.prod HTTP/1.1"

  "GET /nprod789jkj908989heys__/j.prod?icid=&searchType=

  "GET /Zin-carsposn-vwlvet-09878__/c.cat HTTP/1.1"
0 Karma
1 Solution

somesoni2
Revered Legend

Try this

your base search |rex field=yourfield "\"(?<SomefieldName>\S+\s+[^\s\?]+)"

View solution in original post

0 Karma

woodcock
Esteemed Legend

Like this:

(?<myCapture>"[^\s]+\s+[^\s?]+)(?<=\/)
0 Karma

prakash007
Builder

some how it's giving me the date when i do | rex field=_raw (?"[^\s]+\s+[^\s?]+)(?<=\/) | table myCapture, _raw

0 Karma

somesoni2
Revered Legend

Try this

your base search |rex field=yourfield "\"(?<SomefieldName>\S+\s+[^\s\?]+)"
0 Karma
Get Updates on the Splunk Community!

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering. Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...