Hello
I want to extract words from a string followed by a - .
for example in string : "sss-ddd-fff-" , i want the following groups :
1- "sss-"
2- "ddd-"
3- "fff-"

I wrote this regex for doing this : "((?:[^-]+)-)+"
But this isn't working as i said .
Could you explain what regex should i write for the mentioned task ? and what is the meaning of my
regex ?

thanks