I am trying to make a regex that only allows letters/number/and forward slash
However there are a few exceptions:
Before and after the slash can only contain up to 1,9 characters and cannot start or end with a slash.
EG: 8ajsdl/kjadh which is valid.
Current regex i am trying is:
http://jsfiddle.net/2ywpsu5c/
or
var patt = /^(([a-zA-Z]{1,9})+([\/]{1}[a-zA-Z]{1,9})+|([a-zA-Z]{1,9}))$/



Reply With Quote

Bookmarks