复制代码 代码如下: var winpath = /^[a-zA-Z];[\/]((?! )(?![^\/]*s+[\/])[w -]+[\/])*(?! )(?![^.]+s+.)[w -]+$/; var lnxPath = /^([/] [w-]+)*$/;