No, regex is not per se either simple or advanced (though some might find any regex advanced...). There are however different implementations of regex, as "regular expression" itself is just the concept.
Please post regex as code (either with the buttons atop the text box or by leaving a blank line and indeting by four spaces), otherwise the markup will mess it up. I am guessing you wanted to say
^\d+\-\d+\-\d+\s\d+\:\d+\:\d+\,
which means start at the beginning of the string, and then have some digits with dashes, whitespace and colons between them and a comma at the end (I've escaped every character out of habit, even those that don't need it - see here for a list of characters which need escaping).
I'm not sure what you mean with "how do I write the regex", because that's how you write them - no spaces between, straight to the point.
You can start and learn something interesting with that example at this point, which is the following simplification:
^(?:\d+[-\s:,])+
This matches exactly the same pattern as above, but it states that it wants (from the beginning of the string) a digit and then one of either a dash, a whitespace or a colon - and these two, in that order, as often as possible. Try it in regex101 to get a more detailed description and to compare the two regexes!
The only drawback is that the second is much less precise, meaning that the following string:
1,15 99-106 something_further
(which would of course not be matched by the first regex) is gladly accepted by the second.
But with that, I'll let you wander off to the worlds of regular expressions to make your own discoveries. Feel free to come back any time if you have further questions 🙂
... View more