How JS regular expressions validate "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. You cannot have more than two consecutive "/" in the middle.
wrote a ^ < sup id= "fnref-1" > 1 < / sup > (?: (! / /) [S]) * < sup id= "fnref-2" > 2 < / sup > $is found to basically meet the requirements,
but the check fails
when entering a string, such as "a", so ask the bosses if they have a better solution, regardless of the special string

. < hr >
    < li id= "fn-1" > / rooms < li id= "fn-2" > / rooms

/^(?!(\/|.*\/$|.*\/\/))/

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


^[^\/]+(?:\/[^\/]+)*$
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-1b3032c-2b548.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-1b3032c-2b548.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?