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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...