I am trying to check some lines. Here are the options.
- The line must begin with a letter or number
- A string can only contain letters, numbers, or slashes
- A string cannot have a double slash (for example: api // go)
Good lines:
go go2/api/hello go/api45
Bad lines:
/go (can't begin with a slash) go//api (can't have a double slash) go/api% (can't contain non number, letter or slash)
I am trying to use RegExr.com, but to no avail. I tried with this expression:
^[^\/](([0-9A-Za-z])+(\/)?)+
but it does not work.
source share