最近在看JavaScript高级程序设计第三版,看到一个示例不是很明白varcolorText="red,blue,green,yellow";varcolors3=colorText.split(/[^\,]+/);结果color3是["",",",",",",",""]正则表达式[^\,]的意思是说不接受逗号么?不明白为什么会出这样一个结果
varcolorText="red,blue,green,yellow";varcolors3=colorText.split(/[^\,]+/);结果color3是["",",",",",",",""]正则表达式[^\,]的意思是说不接受逗号么?不明白为什么会出这样一个结果
varcolors3=colorText.split(/[^\,]+/);结果color3是["",",",",",",",""]正则表达式[^\,]的意思是说不接受逗号么?不明白为什么会出这样一个结果
结果color3是["",",",",",",",""]正则表达式[^\,]的意思是说不接受逗号么?不明白为什么会出这样一个结果
["",",",",",",",""]正则表达式[^\,]的意思是说不接受逗号么?不明白为什么会出这样一个结果
正则表达式[^\,]的意思是说不接受逗号么?不明白为什么会出这样一个结果
红糖糍粑
宝慕林4294392
相关分类