var str = custom-FEB84A el-popup-parent--hidden帮我用正则匹配到custom-FEB84具体
var str = 'custom-FEB84A el-popup-parent--hidden'; var pattern = /custom-FEB84\w+/; var result = str.match(pattern)[0]; console.log(result); // custom-FEB84A
原文地址: http://www.cveoy.top/t/topic/iDkJ 著作权归作者所有。请勿转载和采集!