无法找到Regex来获取String的一部分

时间:2017-04-18 16:37:25

标签: regex

我正在搜索一个正则表达式来获取此字符串中第四个逗号(“2”)之后的Clamps中的值

"showDetails("S1","72.00","0.00","62.00","2","15","859");"

1 个答案:

答案 0 :(得分:1)

Merely for academic purposes(丑陋地狱):

\((?:[^,]+,){4}"\K[^"]+

...或者只是拆分,并使用相应的数组,如arr[4]