I'm new in RegEx and I have a problem. It looks like easy but whatever I tried, it doesn't work.
I have two lines like :
aaa,bbb,111,22.3,2021-01-01 4:4:4.444
ccc,ddd,555,66.7,2021-02-02 8:8:8.888
This regex does what I want : (.+),(.+),(.+),(.+),(.+)
=> 2 matches with 5 groups
*Match 0 :*
group 1 = aaa
group 2 = bbb
...
group 5 = 2021-01-01 4:4:4.444
*Match 1 :*
group 1 = ccc
...
But if I have more than 5 "fields" it will be complicated. How can I have the same result with something like (.+),"n repetitions"(.+)
? Or something else ? I tried with {n}
and *
but it's not the result expected. I also tried some regex from other posts :
All the modifications tested don't match with my first simple regex ( *(.+),(.+),(.+),(.+),(.+)* )
Edit : I'll finally go for a python solution. Thanks you all