How to implement js regular expression validation "folder A / folder B / folder C..."

are there any js regular expression experts?
would like to ask how to implement regular expression validation "folder A / folder B / folder C..." Or folder A, where
1 is satisfied. Cannot start and end with "/",
2. Cannot have more than two consecutive "/" in the middle,
3. You can write a ^ [^\ /] (?: (?) before you ignore the special string
. \ /\ /) [\ S]) * [^\ /] $
found that the requirements are basically met,
but the check fails
when entering a string, such as "a", so ask the bosses if they have a better solution?


^ [^\ /] + (\ / [^\ /] +) * $


^[^\/]+(?:\/[^\/]+)*$

^ (w) (/ w) {0Magne2}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bd9d3f-39556.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bd9d3f-39556.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?