Regex - Remove everything before first comma and everything after second comma in line

后端 未结 3 1002
孤街浪徒
孤街浪徒 2021-01-17 05:06

I have the following string:

55,1001wuensche.com,0,354137264,1,\"0.00 %\",0,\"0.00 %\",\"2016-04-24 09:00:24\"
56,100hoch3.de,47,2757361,2,\"0.00 %\",0,\"0.0         


        
3条回答
  •  隐瞒了意图╮
    2021-01-17 05:28

    You could search for ^[^,]+,([^,]+).* and replace it with $1.

    If there is a chance of non-well formatted lines (containing empty strings before the first comma or lines without comma) you could use a more strict pattern like ^[^,\r\n]*,([^,\r\n]+).+ instead.

提交回复
热议问题