I have strings that can be URLs or CIDR-blocks. I want to determine whether a string is the path of a URL e.g.:

```
/9this can be/a/path123
/test
/r

```

or a CIDR-mask (`/0` to `/32`):

```
/24
/12
/32

```

I want the regex to exclude CIDR-masks from the matches.

This is what I have so far:

```
^[/?]((?!([0-9]|[1-2][0-9]|3[0-2]))(?=[\S]))[\S ]*$

```

Which works, except for the case where the URL-path starts with a number:

```
/23example

```

I'm coding in Go, if that matters.