正则表达式间隔符空格如何用逗号代替
例如用^(\S+)(\S+)(\S+)\[([\w:/]+\s[+\-]\d{4})\]"(.+?)"(\d{3})(\S+)(?="([^"]+)""([^"]+)")...
例如用 ^(\S+) (\S+) (\S+)
\[([\w:/]+\s[+\-]\d{4})\] "(.+?)" (\d{3}) (\S+)(?=
"([^"]+)" "([^"]+)")?匹配字符串
548a847502112025,2014/12/12 15:51:52,15.1.3.140,57665,15.1.3.185,7180,unknown,POST,"",http://15.1.3.185:7180/cmf/charts/timeSeries 展开
\[([\w:/]+\s[+\-]\d{4})\] "(.+?)" (\d{3}) (\S+)(?=
"([^"]+)" "([^"]+)")?匹配字符串
548a847502112025,2014/12/12 15:51:52,15.1.3.140,57665,15.1.3.185,7180,unknown,POST,"",http://15.1.3.185:7180/cmf/charts/timeSeries 展开
1个回答
推荐于2016-01-12
展开全部
追问
我开始写的正则表达式有错误,我的目的是字符串548a847502112025,2014/12/12 15:51:52,15.1.3.140,57665,15.1.3.185,7180,unknown,POST,"",http://15.1.3.185:7180/cmf/charts/timeSeries以逗号间隔为基准分开输出,分成十个字符串。而且“”不显示。非常感谢!!!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询