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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...