Splunk Search

How do I edit my rex field=UEI mode=sed syntax to 'district' my sample URIs?

karthi2809
Builder

As of now I am using:

rex field=URI mode=sed "s/=[^?]+/=xxx/g"

But its not working

/v1/mb/members/15d628b4-0d113-09b8ec770efd/option

/v1/mb/members/216570ce-c199-4ab9--c0cf3ddd404e/option

/v1/mb/members/36fbe9a8-882d-4a94-882561f81074/option

/v1/mb/members/4d573446-1d4f-483a-c5d64c33/option

/v1/mb/members/5cc2fa84-4b91-45bf-9c1/option

0 Karma

DalJeanis
Legend

Your current rex is telling the system to replace an =, followed by any number of things that are not ?, with xxx.

If you explain what you want it to do, then we can help you.

0 Karma

gokadroid
Motivator

can you please post sample log entries and what do u want to extract/replace from those log entries.

0 Karma

sbbadri
Motivator

rex field=URI mode=sed "s/[^?]+/xxx/g"

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