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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...