js正则 以顿号分割 但是不包含括号内的顿号的正则表达式,js正则表达式取双引号中的值

首页 > 社会 > 作者:YD1662025-06-18 20:04:08

js正则 以顿号分割 但是不包含括号内的顿号的正则表达式,js正则表达式取双引号中的值(1)

用java写了个,如果用别的语言的话自己替换,记得js的全局匹配貌似在后面得加一个g正则表达式就是"[^,]*" public static void main(String[] args) { Pattern p = Pattern.compile("[^,]*"); Matcher m = p.matcher("aBC,English,Accout.Name123_abc,com.hot.sgp.afdsf "); while(m.find()){ System.err.print(m.group()+" "); } }

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.