有没有办法用一个正则表达式匹配以下所有内容?如果不是,那么这样做的好/干净的方法是什么?
/resources/$
/resources/type$
/resources/type/$
/resources/category$
/resources/category/$
/resources/anything here that includes up to 1 slash and ends with that slash
由于存在 ,因此不应匹配以下内容something
:
/resources/type/something
/resources/category/something