I would like to match a string with the following structure string1-string2-string3 where each string can include numerics but no capital letters.
a concrete example would be "hello-world-today"
I have a regex expression, but I am sure it's not optimal since I repeat the same pattern three times.
'([a-z0-9]([-a-z0-9]*[a-z0-9])?)-(([a-z0-9]([-a-z0-9]*[a-z0-9])?))-(([a-z0-9]([-a-z0-9]*[a-z0-9])?))'