正则表达式匹配给定目录的所有子目录但排除该目录

Regex match all subdirectories of a given directory but exclude said directory

我正在尝试匹配 match 目录的所有子目录,但不包括 match 目录。

www.domain.com/match/subdirectory1                 #good
www.domain.com/match/subdirectory2                 #good
www.domain.com/match/subdirectory2/subdirectory3/  #good
www.domain.com/match/                              #bad

谢谢!

试试这个:

/www.domain.com\/match\/([0-9A-Za-z]+\/?)+/

编辑:匹配目录后的多个目录