Url Levels Regex

Dear community,

I am trying to match the URL levels using regular expressions, is there a way that I can match the Regex URL levels or generate them by just giving the base URL of my site?

I used the below code to match the URLs but they don't work, I used this code in Gonative.io for apps

[
{
"regex": "https://example.com/?",
"level": 1
},
{
"regex": "https://example.com/perfumes/?",
"level": 2
},
{
"regex": "https://example.com/home-fragrances/?",
"level": 2
},
{
"regex": "https://example.com/offers/?",
"level": 2
},
{
"regex": "https://example.com/example-gifts/?",
"level": 2
},
{
"regex": "https://example.com/mubkhars/?",
"level": 2
},
{
"regex": "https://example.com/bukhour/?",
"level": 2
},
{
"regex": "https://example.com/mamoul/?",
"level": 2
},
{
"regex": "https://example.com/home-fragrances/?",
"level": 2
},
{
"regex": "https://example.com/personal-care/?",
"level": 2
},
{
"regex": "https://example.com/accessories/?",
"level": 2
},
{
"regex": "https://example.com/others/?",
"level": 2
},
{
"regex": "https://example.com/catalog/?",
"level": 2
}
]