Security

What is regex for website URL? regex

karu0711
Communicator
Labels (2)
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @karu0711,

if the rule is that you want only 4 sections of your url, you could use this regex

| rex "^(?<url>\w+:\/(\/[^\/]+){4})"

that you can test at https://regex101.com/r/r7SZYY/1

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @karu0711,

if the rule is that you want only 4 sections of your url, you could use this regex

| rex "^(?<url>\w+:\/(\/[^\/]+){4})"

that you can test at https://regex101.com/r/r7SZYY/1

Ciao.

Giuseppe

gcusello
SplunkTrust
SplunkTrust

Hi @karu0711,

if one answer solves your need, please accept one answer for the other people of Community or tell me how I can help you.

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...